[wp-hackers] Caching only admins

Brian Layman wp-hackers at thecodecave.com
Fri Sep 14 03:39:47 UTC 2012

The main reason for this is that things like the commenting section has 
user specific information in it when people are logged in.

If you have designed your site to avoid that, you can certainly can build

If you had a plugin that wrote a value out to the cookie for users who 
should not be cached, you could do it with a quick modification of

Just change the !issset check in
to look for  $_COOKIE['do_not_cache_user'] )
or something.

You may not want to use that particular code though as it replaces 
index.php. So it's sort-of a core hack. That's why it's a dirty 
memcache. It's up to you though. You might find the speed increase worth it.

Brian Layman

On 9/13/2012 3:01 PM, William P. Davis wrote:

> I'm wondering if anybody has come up with any creative ways to cache only a
> subset of logged-in users. For example, the website I work on has many many
> subscribers who are frequently logged in but don't need to see any uncached
> content. I'd like to cache all of them, but all the caching plugins I've
> seen checked for the existence of the WordPress login cookie — I don't see
> any way to cache based on user status. Any ideas, besides setting an extra
> cookie at logon?
> Will
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list