• Resolved Marcelo Pedra

    (@kent-brockman)


    Hello guys, I noticed the plugin decides to wipe the entire cache after activating/deactivating some plugins. But this don’t happen with EVERY plugin. Can’t recall now what specific plugins triggered this, but I wanted to ask if this is intended behaviour or not. As you know, there are plugins that work only in the backend, so no cache wiping should be necessary at all time. Does the plugin have an internal list of plugins that work in the backend and thus knowing already after which ones should the cache be wiped?

    Thanks in advance!

Viewing 7 replies - 1 through 7 (of 7 total)
  • @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!

    Thread Starter Marcelo Pedra

    (@kent-brockman)

    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 8 years, 1 month ago by massimod.
    Thread Starter Marcelo Pedra

    (@kent-brockman)

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

    Thread Starter Marcelo Pedra

    (@kent-brockman)

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cache is fully wiped after activating some plugins’ is closed to new replies.