We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31471
    • 206 Posts
    I have a page with a few hundreds of thumbnails generated by phpthumbof. (Only some of them are displayed, one for each album, the rest are hidden, only there for the HighslideJS gallery to catch the whole album.) Thus, the page takes minutes to load the first time (and exeeds the 120 secs limit, so needs to reload 1-2 times to finish).

    phpthumbof snippet has it’s own caching system. This page is also set to be cached, so normally on reload or when going back to it, it takes no time to load from cache.

    However, when I edit the page (sort of organizing, not changing things to display), or when I edit a different page that clears the cache on save, the cache clears completely, and it takes minutes again to load that page.
    I mean modx clears EVERYTHING, all bits of cached material of the site, if I take it right.

    This makes me nervous, because if I edit any other pages, I will have to load my "slow" page manually to fill the cache up, otherwise it will take minutes for my visitors to load it the first time.

    Am I thinking right? If so, is there a chance to clear only the dependant parts of the cache on editing a resource?
      • 24068
      • 4 Posts
      This makes me nervous, because if I edit any other pages, I will have to load my "slow" page manually to fill the cache up, otherwise it will take minutes for my visitors to load it the first time.

      Why load manually?
      Let Xenu’s Link Sleuth (TM) do it: http://home.snafu.de/tilman/xenulink.html

      But seriously: (though Let Xenu’s Link Sleuth (TM) is handy not only to find broken links, also to fill up caches)

      Am I thinking right? If so, is there a chance to clear only the dependant parts of the cache on editing a resource?


      I guess you are thinking right. modX should not clear the whole cache by editing only one page. To clear only the dependant parts of the cache on editing a resource is what you can expect from the modX cacheing mechanism.

      But i don’t know why this happens with your installation of modX. Maybe a plugin? Maybe a general bug?
        • 31471
        • 206 Posts
        Hey, I just found where the cached images gone: there’s a plugin called phpThumbOfCacheManager, which is activated on the OnSiteRefresh event. (Should it check what resource triggered its run, and clear only dependant images?)

        I hope, but can not investigate in it to prove, that the core system does clearing more selective. I suppose Jason, Ryan and Jay could tell it in turn.
          • 24068
          • 4 Posts
          If i’m reading phpThumbOfCacheManager correctly, it clears only the build-in cache of phpThumbOf on the OnSiteRefresh event. And it clears its cache (the one of phpThumbOf) completly, no resource check or something like that.
            • 21792
            • 37 Posts
            How can I stop the thumbnails being regenerated?

            I'm happy for the cached images to persist forever, but each time I load a page on my site I'm having to wait for perfectly good images to be regenerated..........really really annoying!