We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8164
    • 51 Posts
    One of my clients has chosen a *terrible* host, and I’ve had nothing but problems. Unfortunately, looks like I’m stuck with the host, however.

    The hosting company seems to be constantly messing with php, and about once a week the site throws parsing errors. If I refresh the site, it’s okay again...so it has to do with reading pages that were cached before their latest php change.

    My question is, how can I globally turn off caching? (Or, do I need to go into individual documents and uncheck the caching property.)

    Thanks,
    Duane
      • 25663 MODX Staff
      • 12,272 Posts
      You’ll need to turn it off on the individual pages. You should probably also turn off the default for caching in the configuration for convenience for any new pages. The Doc Manager in 095 will make mass changes to pages a fast and nearly pain-free process.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 8164
        • 51 Posts
        Thanks Ryan!
          • 33337
          • 3,975 Posts
          You can use a Plugin to switch off the cache site wide:

          1. Create a new plugin, name it DisableCache or whatever you want.
          2. Enter the code:

          $modx->documentObject[’cacheable’] = 0;
          3. On the System Events tab, check the OnLoadWebDocument
          4. Save it.
          5. Refresh the site.

          It will disable the cache all over the site no matter document caching is enabled in each document or not, this will save your time changing each documents caching settings and when you switch your host which I personally suggest wink, you wont have to re-enable the caching on every document, instead just disable the plugin.

          Hope it helps smiley

          regards.

          zi
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 25663 MODX Staff
            • 12,272 Posts
            Very cool Zi, thanks. smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 6726
              • 7,075 Posts
              Ditto, great tip, might be a good idea to post this in the tips and tricks forum smiley
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 12652
                • 228 Posts
                Great tool during site development! Might help eliminate a lot of headaches.
                  | Identity Developments delivers SEO focused web design and web presence services
                  - it's not about websites, it's about your identity. |
                  • 33337
                  • 3,975 Posts
                  wait .. wait! Thanks to Raymond for nice plugin smiley actually.

                  regards.

                  zi
                    Zaigham R - MODX Professional | Skype | Email | Twitter

                    Digging the interwebs for #MODX gems and bringing it to you. modx.link
                    • 7327
                    • 195 Posts
                    I’m looking at the cache toggle in the Doc Manager bundled with Evolution 1.0.3 but it doesn’t seem to be there. is this an exclusive feature only to 0.9.5? If anyone can tell me where I can find this switch, that would save me a whole lot of trouble. Thanks guys!

                    Cheers,
                    L
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      It’s in the configuration; it sets the default for resource caching to be off. The checkbox will be unchecked. This does not prevent the site cache, though; only individual page caching.
                        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