@kent-brockman Hey Marcelo! That is intended behavior, yes. There is no internal list of plugins that Comet Cache uses to determine when the cache should be cleared, rather it hooks into the WordPress Core activated_plugin and deactivated_plugin to clear the cache whenever a plugin is activated or deactivated.
I can’t think of any reason you wouldn’t see the cache get cleared when you activate/deactivate a plugin — if you can reproduce that behavior with a specific plugin, I’d love to know the name of it so that I can do some testing.
We realize that not all plugins affect the front-end of the site and therefore not all plugins require clearing the cache, however there’s no good way for Comet Cache to know one from the other, so we take the safe approach and clear the cache. If we didn’t clear the cache and a plugin was activated that did affect the front-end, it might be interpreted as a bug to the site owner (the new plugin they just activated would seem to have no affect on the front-end until the cache was cleared).
It’s possible to disable the automatic clear/wipe routines; see Disabling Automatic Clear / Wipe Cache Routines. If you only wanted to disable those when activating/deactivating a plugin, you might write some additional code that checks which page the current request is coming from to see if a plugin is being activated/disabled.
I hope this helps!
Roger that. Now is crystal clear. Thanks for the clarification!
I was also nervous about this at first, then i realized that it is a totaly set-it-and-forget it caching plugin.
I set my cache expiration to 1 year (because you will never reach that timeframe) and forget about it.
-
This reply was modified 9 years, 8 months ago by
massimod.
@massimod:
Hi, the only downside of setting 1 year long expiration is that if you have widgets showing dynamic contents like, i.e., Latest Posts or the Most Viewed ones, you run the risk of showing constantly outdated information due to the persistence of the cache. Am I wrong?
You will NEVER reach 1 year, because you will update some plugin, disable a plugin or update WP. So your cache will be wiped. So 1 year or 10 years, will never be the case. But set it to whatever you want, so you sleep at night …
As for widgets, that is a problem with all caching plugins. Some widgets are Ajaxized, so look for that.
Well, Ajax based plugins are still making queries to database, which is, in the first hand, the objective to avoid by using cache 🙂
@raam Dev:
I have another question. The same filters to empty the cache whenever a plugin is updated will be triggered if you perform remote updates by using JetPack control panel or systems like InfiniteWP, right?
The same filters to empty the cache whenever a plugin is updated will be triggered if you perform remote updates by using JetPack control panel or systems like InfiniteWP, right?
Yes, any time a plugin is updated — no matter where it’s updated from — the old plugin will be deactivated and the new version of the plugin activated, at which time the activated_plugin hook will fire and the cache will be cleared.