• Resolved ronggeshi

    (@ronggeshi)


    Hello,

    My website doesn’t require frequent updates, so I set a very large TTL value. However, I encountered a problem — when the TTL exceeds 400,000,000, the caching function completely stops working and always results in a cache miss.

    I suspect this might be due to the int32 integer limit. The current timestamp (1762627866) plus 400000000 exceeds the maximum range an int32 can represent (−2147483648 to +2147483647), which likely causes the issue.

    I sincerely hope this can be addressed.Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    yeah , that won’t work once you set that large , a month or so as maximum cache TTL should be good enough ,it’s kind of meaning less to set it like 10 years of TTL…

    Thread Starter ronggeshi

    (@ronggeshi)

    Thank you for your reply.

    The timestamp 2147483647 corresponds to 2038-01-19 11:14:07, which means that once this date is reached, all cache functionality will stop working. Although that day is still some time away…

    Additionally, may I ask if it’s possible to modify one of the source files to change the data type and overcome this limitation? If so, could you please let me know which file or variable should be modified? Thank you very much.

    Plugin Support litetim

    (@litetim)

    @ronggeshi thank you for the topic

    I talked with the devs and, at this moment we will not change the code to accept bigger integer numbers.
    We are updating the plugin frequently enought for the cache to be invalidated and generate new cache.
    If you want to look over the code, our code is on github: https://github.com/litespeedtech/lscache_wp

    Tim

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.