Nov
03
2009

WP Super Cache Developer Documentation

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!

Related Entries

5 Comments »

  • Emilio says:

    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?

  • Gerrit says:

    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!

  • William says:

    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.

    • Donncha says:

      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.

RSS feed for comments on this post. TrackBack URL


Leave a Reply

  • If this is your first time commenting here, it will be held for moderation.
  • Your website link will not appear until you leave several comments.
  • Spam comments will be sanitized.
  • All links are nofollowed.
  • Comments may be edited or deleted at the discretion of the author.
  • Thanks for commenting!

Random Tweet: Man saved more than 30 before he lost his own life in Philippines floods. http://is.gd/3Y06u #

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com

Holy Shmoly! is Digg proof thanks to caching by WP Super Cache