Selective caching?

I am thinking of not using a separate admin portal, but instead
letting the admin of my application use the same interface as the end
users see. The admin will then be able to see special "edit", "delete"
links next to blog posts, which users won't see.

But as I understand it, that would mess up caching. If I for example
cache the front page of my blog, users could end up being served the
admin page instead, or the admin could get the cached standard page
instead. Is there a way to switch off caching logic for a specific
condition, like a user being the admin?

Sometimes just when you ask the question, you find the answer. If
anyone has the same question as I, here are some potential answers