Setting Cache on Category Pages
-
Hi, I have a unique scenario that maybe you can help with….
I have a site (served by WPE, of course) that contains a collection of pages that are very server intensive. (They are intensive for reasons beyond my control — they make several calls to an external APIs.) I would like to get these pages behind a longer cache.
These pages are constructed via a custom taxonomy — let’s call the taxonomy “colors.” Every time a user adds a new term to the taxonomy (“blue”, “red”), wordpress creates a new page (“/colors/blue/”, “/colors/red/”). These pages are served via a standard template file (taxonomy-colors.php). I want only these pages (within that category and served at /colors/) to receive a longer cache.
So that’s the scenario. Here are a few questions:
1) I don’t think your plugin can “get” to these pages, correct? I see you can set a cache length on pages, but I think those are “Pages” in the purely WordPress sense. Correct assumption?
2) If #1 is correct, do you foresee adding this level of granularity any time soon? (I could imagine, for instance, a basic option for setting caching on category pages, which is basically what these are.)
3) If #2 is no, then I have a different thought. I’m looking at the codebase of the plugin… I see you are basically identifying the page type and setting its cache header. Do you foresee any problems with me adjusting your plugin to accommodate my circumstance? I realize you cannot “officially sanction” that… but I’m more just wondering if you had thoughts on what sorta of obstacles I might encounter.
And since you are intimately knowledgable of this topic, I might as well throw caution to the wind and ask… do you have thoughts on any other solutions?
I might have to abandon WPE if I cannot figure this out.Thanks for your help!
- The topic ‘Setting Cache on Category Pages’ is closed to new replies.