We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17851
    • 213 Posts
    How are the following used?

    • cache_disabled
    • cache_expires

    My client hosts their site at GoDaddy and we're having cache issues like cached snippets have syntax errors, etc. It doesn't happen all the time, so I've tried to have the cache refresh itself after a minute by setting cache_expires = 60, but that doesn't work. So I tried to disable all caching by setting cache_disabled = yes, but that doesn't work either.

    Am I misunderstanding these?
    [ed. note: MacLonghorn last edited this post 12 years, 11 months ago.]
      Mark Macatee
      President
      Power 10 Solutions
      http://www.power10solutions.com
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: MacLonghorn at Oct 14, 2013, 07:02 AM
      How are the following used?

      • cache_disabled
      • cache_expires

      My client hosts their site at GoDaddy and we're having cache issues like cached snippets have syntax errors, etc. It doesn't happen all the time, so I've tried to have the cache refresh itself after a minute by setting cache_expires = 60, but that doesn't work. So I tried to disable all caching by setting cache_disabled = yes, but that doesn't work either.

      Am I misunderstanding these?
      Unfortunately, cache_disabled is not currently (and has never been) functional.

      cache_expires should work as you expect, but there have been a number of issues with MODX caching reported on GoDaddy servers. I believe this is related to the fact that flock() is not functional on their platform. Have you tried setting use_flock to false in the $config_options array in your config file? This option has been available since the 2.2.5 release, and though it did not resolve the issues on Rackspace Cloud, it may help with the GoDaddy issue.

      $config_options = array(
        'use_flock' => false,
      );
        • 17851
        • 213 Posts
        No, I have not tried that. If I set use_flock = false, you're saying that should make 'cache_expires' work?
          Mark Macatee
          President
          Power 10 Solutions
          http://www.power10solutions.com
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: MacLonghorn at Oct 14, 2013, 10:24 AM
          No, I have not tried that. If I set use_flock = false, you're saying that should make 'cache_expires' work?
          No, that *should* prevent the broken cache files, which are caused by multiple threads attempt to write to the file at the same time... cache_expires just makes the individual cache entries expire that many seconds after each is created.
            • 17851
            • 213 Posts
            Got it. B/c I still see old cache files (8 minutes old, cache_expires = 60).

            We'll see if that setting fixes the cache files for today, but we won't be able to run an extensive test at the moment -- we have to roll back to Evo tonight.
              Mark Macatee
              President
              Power 10 Solutions
              http://www.power10solutions.com
              • 22303 MODX Staff
              • 10,725 Posts
              Most cache files will remain until they are accessed for the first time after expiration when using cache_expires, and will immediately be rewritten by the process that reads and removes the expired entry.
                • 17851
                • 213 Posts
                Well, that's what I thought, but I've tried to hit a page again and I'm still seeing the old file. Who knows...from here on out, I'll know better. Thanks!
                  Mark Macatee
                  President
                  Power 10 Solutions
                  http://www.power10solutions.com