Feature Request: Ability to manually clear cache for pages / posts / tags / categories #596
Comments
@aziernest Thank you for the feature request! @jaswsinc We already have options for these related to automatic cache clearing, but I think a good addition to those would be options inside manual cache clearing so that you can select which things should be cleared when you manually click the "Clear Cache" button. Additionally, next to each new section inside Manual Cache Clearing should be another button specifically for each one of those things (i.e., "Clear Posts Cache", "Clear Pages Cache", "Clear Tags Cache", "Clear Categories Cache"). Thoughts? |
@jaswsinc Awesome, you got my exact point. I understand and already knows that zencache clears relevant pages upon post publication or updation very well and yes I was talking about manual cache clearing stuff. is that feature hard to develop ? |
Coming with the next update, we're including a new menu of options that will allow you to clear only the current page, or clear only a specific URL, along with a few other options depending on what's active on your server: @raamdev writes...
After thinking this over some more, I no longer think this is a good idea. The manual "Clear Cache" button is intentionally designed to ensure that clicking it will clear everything, to get a fresh start. If we provide options for changing that behavior, i.e., if we make it possible for the "Clear Cache" button to only clear some of the cache files for the site, then we're making it easier for site owners to get confused about why some parts of their site appear to still be cached even after they click "Clear Cache".
While I do think this would be a helpful addition, I realize now that figuring out what constitutes the "Category Archive Cache" is not a trivial matter. If there are a hundred Categories on a site, each category will have its own Category Archive cache. Likewise with Tag Archives and Custom Post Type Archives, Custom Term Archives, and Author Archives. It's certainly not impossible, but it is a very complex feature. I feel that the new clear cache options menu (see screenshot above) should suffice for now. One of those options gives site owners the ability to clear the cache for the Current URL, so they could just visit the page they want to clear the cache for and then choose that menu item to clear the cache for that URL. As a future enhancement to the new clear cache options menu, we could allow for the creation of a "Custom Clear Cache Option", which would add another item to the new menu of options. It could then be possible for a site owner to build their own Clear Cache "command" using the ZenCache API. I'm going to open a new GitHub issue to track this idea. See Issue #600. |
Next Pro Release Changelog:
|
ZenCache v151114 has been released and includes changes from this GitHub Issue. See the v151114 announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#596). |
clear cache for separate pages
i.e
clear "post cache"
clear "category/tags cache"
particularly, posts caching is something that rarely requires update even when new post is published, the category page changes, home page and / or tag pages too but not previously published post, so it would be a good idea to keep post cache for longer time, and even if we need to clear cache, we just clear everything except posts.
The text was updated successfully, but these errors were encountered: