• Doncha, I need a bit of help please. Can you outline a strategy for not serving a cached file if I have switched themes? I have a plugin that I have written conditionals: if there is a GET variable for the theme switch, I set a cookie header location and then if the cookie is set, I add filter for style sheet and template. Vice versa for switch-back if the filter exists, remove, etc.
    However Super Cache breaks it.
    I am assuming that a plugin for SC would be the way to go? Also, can I do this without falling back to late init?
    Appreciate the advice VERY much 🙂

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Yeah, a plugin for SC is probably the best way. It’ll have to check for that cookie and change the $cache_key.

    Thread Starter GoodNewsDesign

    (@goodnewsdesign)

    Hey, Doncha, quick update: I found that first of all SC is a formidable bit of code 😉 and that if you supply it with a fresh get variable, that that solved my little problem. If you want a copy of my plugin, let me know. Does seem like a timely issue maybe as there seemed to be no real working theme switcher that would work with SC!
    So anyway, I ended up tossing the plugin I was writing for SC and just making sure the one I already wrote worked… (with SC).

    GoodNewsDesign, does your plugin rebuilds the website’s complete cache when the theme is changed?

    That’s exactly what I wanted to do!

    Can you show me your code, please?

    I figured it out. It is actually quite use, just using wp_cache_clear_cache() whenever the theme updates options.

    But I have a question though, in WPMU (Multisite), wp_cache_clear_cache() affects only a given website, not the entire network, right?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: WP Super Cache] Basic Developer instructions: conditional cache rebuild’ is closed to new replies.