keycdn / cache-enabler

A lightweight caching plugin for WordPress that makes your website faster by generating static HTML files.
https://wordpress.org/plugins/cache-enabler/
123 stars 46 forks source link

update cache behavior #88

Closed coreykn closed 4 years ago

coreykn commented 4 years ago

Change WooCommerce product stock update cache clearing. Clear individual product page cache instead of complete cache unless new Cache Behavior option is enabled. The new option is only displayed if the WooCommerce plugin is active.

Only clear home page cache or complete cache when a new post type is initially published. Previously this was evaluating as true in other scenarios, like on post quick edits. This was implemented by checking if the $post->post_date_gmt and $post->post_modified_gmt values are the same. Update the related Cache Behavior setting description to improve understanding of functionality.

Change default clear cache publishing action from "Completely" to "Page specific" instead. This was requested and accepted in PR #38 and then later reverted in 12cc2bf. For this change to be successful the logic in the publish_post_types() method that checks this also needed to be updated. Updating the user meta key _clear_post_cache_on_update to reflect this change will not be done automatically. It may be better to store the meta values as strings instead to avoid this. It would also make it easier to extend in the future if ever needed.

Closes #82

gerardfigols commented 4 years ago

Thank you very much. I am looking forward for the update including the feature which would resolve the issue.