• 
      

    Fix the expiration time for ratelimit caching.

    Review Request #15045 — Created May 12, 2026 and submitted — Latest diff uploaded

    Information

    Djblets
    release-6.x

    Reviewers

    When adding the initial count for a rate limit window in cache, the
    expiration was being set based on the window value, which was too large
    to be accepted by the cache backend, being a UNIX timestamp and not a
    number of seconds in the future. This resulted in the add failing.

    We now use the number of seconds remaining + 60 instead, which isn't
    exactly the same but gives us a suitable expiration with a buffer built
    in.

    Tested this build in production and verified it fixed the rate limit
    caching.

    Commits

    Files