We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Hi,

    I’ve noticed that the cache is cleared every time a page is saved. Shouldn’t only the cache of the affected page be cleared?
    Because we are doing updates to the website every 5 minutes, the cache is cleared every 5 minutes so the site is slow.

    I guess I have to modify the emptyCache() function to work the way I want. Or maybe somebody can provide an alternative solution.

    Thank You
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The problem is that if you move the document to a different folder, change its menu index, menu title, or alias, all of the other cached pages will still contain the old menu structure. Unless, of course, you have the Wayfinder call uncached, and that will itself slow down every page.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 5340
        • 1,624 Posts
        So maybe it’s better to clear all the cache when a document is moved but keep the rest of the cache files when it is saved.

        Anyway I still have to try Evolution’s cache system.

          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: Cipa at Jun 12, 2009, 08:30 AM

          So maybe it’s better to clear all the cache when a document is moved but keep the rest of the cache files when it is saved.
          But that only applies to editing existing pages; anytime you save anything in MODx Evolution (0.9.x/1.0), it needs to clear the entire cache. If you don’t want that to happen immediately, uncheck the clear cache checkbox when editing a page. In general this is not a problem unless you have a very high traffic site. IMO, it’s much better to cache as much as possible and update dynamic sections when things are edited. If you just make everything uncacheable, the performance of the site is going to suffer.

          Quote from: Cipa at Jun 12, 2009, 08:30 AM

          Anyway I still have to try Evolution’s cache system.
          Evolution’s caching system is no different than 0.9.x. Revolution’s is much different however, and by the time we release 2.0 final, there will be some very flexible ways to control various parts of it’s cache during the course of editing.