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

    Are you happy how MODx cache function works? I’m quite unsatisfied. Caching of script-generated websites is not a easy task, actually it can be very complicated. It depends not only on the application itself, but also how it is used.

    I build websites, that are generally rarely modified. In this case - when nothing is modified - there is no reason to compute anything at all. So I made a simple, super-primitive version of caching system, based on .htacces’ mod_rewrite rules.

    Basically MODx saves the output in some HTML file and .htacces test it’s existence. If it exists, it returns that file.

    Result are really stunning - consider, that not even PHP interpretter is started (pure.html), it’s as fast as it can be.

    Now I would like to integrate this into modx, but I’m not really sure how to do it. There simply must be some management inside, handlinkg cases that some site IS modified. If the cache system is so hi-end as here, it’s usually implemented as if ANY change occurs, the WHOLE cache repository is deleted. It’s one of the case when the algorithm sounds bad but the results in practice are fine.

    ( Btw, I don’t care about statistics and so on, as far as we have Google Analytics. IMHO stats should be complete ripped off the project, it won’t never be at least as good as phpMyVisites (not mentioning GA) and it’s only complicating the source. Why trying to maintain a feature, that other GPL project will do much better. )
      • 25663 MODX Staff
      • 12,272 Posts
      I’m all for nuking the built in stats. I’m also all for cache optimizations.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me