We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23134
    • 33 Posts
    I have site on MODX Revolution 2.1.5-pl (traditional) and BobRay's package captcha.
    If call Captcha (assets/components/captcha/captcha.php) she olways set session var $_SESSION["veriword"] is equal of image on she.
    But, modx get $_SESSION from cache in DB (table modx_cache if prefix modx_)...

    Thus, the image (assets/components/captcha/captcha.php) is always different, but the value of the cache is stored verivord a while the old and same...

    Help please, how disable caching $_SESSION, or olways rewrite one var $_SESSION['veriword'] ?

    Thank you!

    >>>===<<<

    My hosting conflicting with modSessionHandler. On another hosting worked... But i dont know which is why it did not work...

    But i disable his (modSessionHandler) on manager -> System -> System Settings -> session_handler_class -> clear value...

    And all works.

    Yhanks All for help! [ed. note: Petja last edited this post 14 years, 11 months ago.]
      • 23134
      • 33 Posts
      Link for test http://new777.veterany.org/forum/vstrechi.html [ed. note: Petja last edited this post 14 years, 11 months ago.]
        • 3749
        • 24,544 Posts
        Petja, I'm unable to make this happen on MODX 2.1.5.

        Are you using SPForm or FormIt, or your own code to call the captcha utility? Make sure any snippet calls are uncached:

        [[!SnippetName]]
          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
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          I would think that every update to the SESSION, such as the change made when using a veriword feature, would clear that table's cache?

          The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed.

          http://dev.mysql.com/doc/refman/5.1/en/query-cache.html
            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
            • 23134
            • 33 Posts
            Quote from: BobRay at Nov 20, 2011, 05:03 PM
            Petja, I'm unable to make this happen on MODX 2.1.5.

            Are you using SPForm or FormIt, or your own code to call the captcha utility? Make sure any snippet calls are uncached:

            [[!SnippetName]]

            Thanks!
            All snippets uncacheble (!) I know it.
            Trouble in caching session datas.
              • 23134
              • 33 Posts
              Quote from: sottwell at Nov 20, 2011, 11:16 PM
              I would think that every update to the SESSION, such as the change made when using a veriword feature, would clear that table's cache?

              The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed.

              http://dev.mysql.com/doc/refman/5.1/en/query-cache.html

              Seems trouble in this!
              It is only necessary to understand how to disable caching for this table only.

              Spasibo!
                • 22303 MODX Staff
                • 10,725 Posts
                The entire cache_db feature in MODX 2.1.x is broken. Just disable cache_db.
                  • 23134
                  • 33 Posts
                  I'm sets in my.cnf
                  set-variable = query_cache_limit=0
                  set-variable = query_cache_size=0

                  Now still does not work, caches session...

                  How disable caching only one variable $_SESSION['veriword'] ?

                  Even if it will turn off query_cache - server will slow down...
                    • 23134
                    • 33 Posts
                    Quote from: opengeek at Nov 21, 2011, 08:12 AM
                    The entire cache_db feature in MODX 2.1.x is broken. Just disable cache_db.

                    cache_db => No
                    cache_db_expires => 0
                    cache_db_session => No
                    cache_db_session_lifetime is empty

                    this was...
                      • 23134
                      • 33 Posts
                      Now
                      mysql> show variables like 'query_cache_size';
                      +------------------+-------+
                      | Variable_name | Value |
                      +------------------+-------+
                      | query_cache_size | 0 |
                      +------------------+-------+
                      1 row in set (0.00 sec)

                      mysql>

                      But veriword again cached...