Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-3041

CaptchaHelper data are not well purged

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.2.0
    • None
    • None
    • None
    • 4.2 M9

      On a single day on a production server, I have 12000+ cached captcha instances, leading to a 500 Mo cache !

          [RUNTIME-3041] CaptchaHelper data are not well purged

          After a reflection, we decided to add a schedulable to clean the captcha cache. We can do it at each generation/validation of a captcha, but it can be greedy if there are a lot of connections.

          The periodicity of cleaning is a mandatory config parameter if the internal Ametys captcha is selected as captcha type.

          Bérénice Maurel added a comment - After a reflection, we decided to add a schedulable to clean the captcha cache. We can do it at each generation/validation of a captcha, but it can be greedy if there are a lot of connections. The periodicity of cleaning is a mandatory config parameter if the internal Ametys captcha is selected as captcha type.

          Bérénice Maurel added a comment - - edited

          The old captchas are removed only on validating a captcha and only if we try to validate a "static" captcha which is rarely used. And only if one of the static cache is invalid (not the dynamic one), and only if the capcha we are testing is not the corresponding one.

          Also, maybe captchas cache should be updated each time we get a new one. Because if a user refresh his captcha without validating several times, it fill the cache.

          Bérénice Maurel added a comment - - edited The old captchas are removed only on validating a captcha and only if we try to validate a "static" captcha which is rarely used. And only if one of the static cache is invalid (not the dynamic one), and only if the capcha we are testing is not the corresponding one. Also, maybe captchas cache should be updated each time we get a new one. Because if a user refresh his captcha without validating several times, it fill the cache.

            Unassigned Unassigned
            cedric Cédric Damioli
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: