We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5160
    • 118 Posts
    chris.dempsey78 Reply #1, 12 years ago
    I use xFPC on most of my sites and it occured to me that once the xFPC cache is populated every page of the website is available at /core/cache/xfpc/ named as a sha1 hash of the page url.

    If the cache files were named to match the page url and had an .html extension eg.
    - category-product-item1.html for www.domain.co.uk/category/product/item1.html

    url rewriting could be used to sidestep the PHP engine and return the page more quickly.

    Obviously this would require some adjustments to xFPC but I ran some quick tests on the time taken to return the page:

    - 60ms .html
    - 160ms xFPC active
    - 210ms xFPC inactive

    And it looks like there is a saving of around 100ms to be had.

    The major drawback I see with this method is there is no way to determine whether a user is logged into the Manager to sidestep the cache.

    Are there any potential issues I missed and is there any merit in looking at this further?
      • 26681 MODX Staff
      • 123 Posts
      This is very similar to what the Statcache plugin https://github.com/opengeek/statcache/wiki by Jason Coward does.
        [sepiariver.com] (https://sepiariver.com/)
        • 5160
        • 118 Posts
        chris.dempsey78 Reply #3, 12 years ago
        It appears my brain needs a restart. I knew Statcache existed but my brain was telling me it works like getCache ie. caching elements rather than full pages.

        I'll give Statcache a try.

        Thanks.