I’ve finally found the time to write up some documentation for developers who want to work with WP Super Cache.
It’s a work in progress but should help other plugin developers who want to interact with the cache.
Suggestions and comments welcome.
PS. If you’re in Cork on November 14th, head along to BarCamp Cork III. I’ll be giving a talk, “How WP Super Cache Works”. It’ll be less technical than this but I’ll answer questions too. Check out the other sessions too.
If you like this post then please subscribe to my full RSS feed. You can also click here to subscribe by email. There are also my fabulous photos and funny videos to explore too!
This is the personal blog of Donncha O Caoimh, Irish WordPress developer and sometimes Photographer.


Good! This is exactly what I needed.
Now Autoptimize will interact better with WP Super Cache
By the way, when will wp_cache_clear_cache() be available?
In the next version. I need to sort out a few gettext problems and sync with a few people who volunteered to translate. Maybe end of the week.
Just wanted to thank you for your advice and the documentation. It’s great and will be really helpful in the future. My cookie-plugin, btw, works fine now
Thanks again!
Feedback requested, feedback provided.
1. “The plugin folder normally lives in wp-super-cache/plugins/ but by modifying the $wp_cache_plugins_dir variable in the config file you can put it anywhere. That’s a good idea if you develop your own supercache plugins …” That’s fine and dandy – until another SC plugin comes in and sets $wp_cache_plugins_dir for itself.
2. Please elaborate on the four filters wp_cache_key,
wp_cache_served_cache_file, wp_cache_get_cookies_values and do_createsupercache, such as possible secondary usages. Three common examples:
a. running my own PHP on before serving half-on requests without editing wp-cache-phase1.php myself.
b. force serving a fresh page if the http referer is a search engine result page.
c. force expiring the cache for a page because of a querystring parameter.
I call them ’secondary usage’ because filters aren’t supposed to have side effects. Go figure.
Sorry to bust your chops, Donncha, ye know those two sample plugins? Both absolutely aint got no inline documentation — not even one line of comment! Aint much help if your doc tells a padawan to use ‘em as a reference.
Thanks for posting this.
Thanks William!
$wp_cache_plugins_dir is set in your config file which isn’t updated when you upgrade the plugin so no need to worry about that.
I’ll see about adding more examples, and comments to the plugins. Glad you found the docs useful.