I'm building a Wordpress cache plugin for use with Hiawatha cache.
So far it is going well. I'm aware of the dangers for caching logged in pages etc.
That part is ok.
The problem that I have is that when a admin logs in on the Wordpress site and browses to the home page, Wordpress show an admin bar on the top of the page and some other stuff.
I've handled that when a admin logs in the cache is cleared, however the moment a non logged in user browses the homepage it's getting cached. The moment the admin browses to the homepage it get the page from the cache (the non logged in version).
That is understandable and totally correct.
But is it possible to tell Hiawatha to bypass the cache when a user is logged in?
Nginx solves this problem like this (from nginx config file):
# Don't use the cache for logged in users or recent commenters
if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
set $skip_cache 1;
}
Hiawatha version: 9.2
Operating System: Debian 7 32 Bit