-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature Request: Custom expiration time for Posts/Pages #170
Comments
@liphenom Thank you for the feature request. I'll add this to the todo list. |
I think having a separate expiration time could get hairy. While the Post/Page content itself might not change, other portions of a Post/Page introduced by a theme could definitely need to be refreshed; even after what might seem like a small tweak. That's the nature of page caching. I guess having an option for site owners who prefer it is OK, so long as it doesn't make things overly complex; or introduce a feature to a novice site owner that might not realize the full implication of doing such a thing. Overall though, I see this as a very rarely-used feature. |
Re: the comment about something changed in a theme. Page/post content could also be affected by plugin activation or deactivation. When that happens, it seems the effect would or could be site wide, so QC may need to have a hook somewhere that any plugin activation/deactivation and/or theme settings change might prompt/suggest a manual page cache purge by the admin/user, then let the admin/user decide to purge cache or not. |
@ronnieg303 Quick Cache already detects many such changes and figures out when it should clear the cache. For example, when you switch your theme, Quick Cache detects this and wipes the cache. However, I'm glad you brought these issues here as there are a few other features/todos that should have Issues opened for them. I've opened two GitHub Issues related to your comment above: |
Including comments from #302 (so that it can be closed in favor of this issue): @ronnieg303 writes...
@raamdev writes...
@ronnieg303 writes...
|
Including comment from #482 (so that it can be closed in favor of this issue): @ronnieg303 writes...
This was from a feature request for an Auto-Cache Engine feature that I feel should not be part of the Auto-Cache Engine but rather part of the new Expiration Time settings that should be added as part of this GitHub Issue. In addition to setting a custom expiration time for Posts and Pages in general (globally), it would be nice to have the option of setting a custom expiration time on a per-post/page basis, so that some posts/pages could be set to expire at different times than others. We might even include a text box where an advanced site owner could provide a list of URLs with a specific format that includes the custom expiration time, as shown in the example above. That would be very useful for site owners who need to set custom expiration times on many posts at once. @jaswsinc writes...
I think there's some misunderstanding here. A custom expiration time for a post/page would have no effect on higher-level auto-purge/clear routines. If there were a hundred pages with different expiration times and a new plugin was installed, the entire site cache would still get wiped (assuming this hasn't been manually disabled--we have feature requests open to improve this behavior as well; see #307 and #308). The point being, a custom expiration time simply means the cache for that specific post/page is only allowed to live a certain amount of time, after which a future request will generate a new cache of that page. |
Copy that. I understand. I don't see a problem with this then. However, I stand by my original comment, this is going to be rarely used and it has the potential to create confusion. Not just for site owners, but for anyone assisting a ZenCache customer. Being able to set a custom expiration time is fine, but when you write in for assistance and you have custom expiration times set for a variety of pages and don't fully understand how this works, things begin to get hairy; i.e., more difficult to debug. Anyway, I do see the value in such a feature. I'd give this a priority of 2/10 though. Or, perhaps it would be easier to implement this as a Filter in WordPress, and then provide an article that explains how to prepare a map of Posts/Pages to expiration times. |
This is easily resolved by providing more debugging information inside the cached files themselves. For example, if there's a custom expiration time applied to something, the cache file could indicate that at the bottom in the debugging notes. Related to #292.
Yep, that would work too. A WordPress Filter might be a better way to go. If there's a greater demand for a UI for this, we could reconsider adding a UI. |
To further extend on this feature request, it would also be nice to be able to set different automatic expiration times for different taxonomies. Referencing internal ticket: https://websharks.zendesk.com/agent/tickets/12422 |
Requested here: |
Feature that allow you to set another expiration time for posts/pages only, because post page don't change that much. It can help to reduce load on server.
The text was updated successfully, but these errors were encountered: