We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53523
    • 2 Posts
    Hello!

    The question is simple: how to clear cache?
    I use MODX 2.5.7

    I have my static index.html stored in /assets/theme folder, any changes i make in this file are not displayed because this entire file is stored in /core/cache/resource/web/resources/1.cache.php

    I tried executing $modx->cacheManager->refresh();, deleting all the contents of core/cache/ and turning off caching, but nothing works - the 1.cache.php gets ressurected any time i request the page. Sure i request the page with clean cookies and browser cache. Looks like MODX uses some black magic to store it's cache not only in cache folder but also somewhere else.

    Note that i'm not a MODX developer, i'm not even a PHP dev.

    Thanks in advance, your help is appreciated!
      • 17301
      • 932 Posts
      Manually deleting the files inside core/cache folder should work. You could also try passing a query string ie: http://yoururl.com/index.php?id=1?refresh
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 53523
        • 2 Posts
        Quote from: lkfranklin at Jun 11, 2017, 05:39 AM
        Manually deleting the files inside core/cache folder should work. You could also try passing a query string ie: http://yoururl.com/index.php?id=1?refresh

        It didn't work, deleted cache files get resurrected after page refresh.
          • 37523
          • 141 Posts
          Are you sure that the cached version of the page you are seeing is not from within your browser? Have you cleared your browsers cache? Tried viewing the site in another browser on another computer that has not recently viewed the site. Clearing all the files in the core/cache folder/directory should reset all cache within the MODX site.
            Glyn Szasz
            Sydney, Australia

            Happy to help (when can) and happy to learn

            If you are a Sydney based MODX developer would love to hear from you. Please contact me.
            • 3749
            • 24,544 Posts
            If you don't want to clear your browser cache, you can view the page in private or incognito mode to get the same effect.

            As LK says, putting a query string at the end of the URL should also work, but be sure to change it after you make any changes and before testing.

            FYI, the CacheClear extra will delete all files in the core/cache directory for you.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting