Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Ability to manually clear cache for pages / posts / tags / categories #596

Closed
aziernest opened this issue Oct 24, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@aziernest
Copy link

@aziernest aziernest commented Oct 24, 2015

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.

@raamdev
Copy link
Contributor

@raamdev raamdev commented Oct 27, 2015

@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?

@raamdev raamdev changed the title clear cache separately for pages / posts / tags / categories Feature Request: Ability to manually clear cache for pages / posts / tags / categories Oct 27, 2015
@aziernest
Copy link
Author

@aziernest aziernest commented Oct 27, 2015

@jaswsinc Awesome, you got my exact point.
i.e., "Clear Posts Cache", "Clear Pages Cache", "Clear Tags Cache", "Clear Categories Cache"). Thoughts?

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 ?

jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
@jaswrks jaswrks mentioned this issue Oct 30, 2015
2 of 2 tasks complete
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 30, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 31, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 31, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 31, 2015
jaswrks pushed a commit to wpsharks/comet-cache-pro that referenced this issue Oct 31, 2015
@raamdev
Copy link
Contributor

@raamdev raamdev commented Nov 1, 2015

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:

2015-10-31_21-01-56


@raamdev writes...

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.

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".

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").

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.

@raamdev raamdev removed the needs feedback label Nov 1, 2015
@raamdev raamdev added this to the Next Release (Pro) milestone Nov 1, 2015
@raamdev
Copy link
Contributor

@raamdev raamdev commented Nov 1, 2015

The feature added here was also discussed and requested in two other GitHub issues: #380 (Button to Clear Cache for Current Page) and #519 (Button to Clear Cache for Home Page).

This new feature coming in the next release closes both of those issues.

@raamdev
Copy link
Contributor

@raamdev raamdev commented Nov 1, 2015

Next Pro Release Changelog:

  • New Feature! The Clear Cache button in the Admin Bar now includes a sub-menu with several new options for clearing the cache from anywhere on your site. You can clear the cache for just the Home Page, the Current URL, a Specific URL, PHP's OPCache (if active), or the CDN Cache (when Static CDN Filters are configured). This menu comes in two flavors and can be customized (or disabled entirely) inside ZenCache → Plugin Options → Manual Cache Clearing. Props @jaswsinc. See Issue #596.

2015-10-31_21-01-56

@raamdev
Copy link
Contributor

@raamdev raamdev commented Nov 14, 2015

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).

@wpsharks wpsharks locked and limited conversation to collaborators Nov 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants