KV ExpirationTtl limit

Hi,
I did not find in the documentation the expiration ttl limit for key/value expiration, for example if I choose 1 century = 3155695200s
let ttl = Number("3155695200"); await KVSTORE.put(key, value, { expirationTtl: Number(ttl) } );

It throws an error.
Putting 31556952 (1 year ) is OK.

What’s the error you get? If you just don’t set a TTL it will never expire.

As a side note, I just set a value with a TTL of 1000 years through the API with no error

Thank you for your answer…
I know that with no ttl it will not expire.

the error with this value
Error: KV PUT failed: 400 Invalid expiration_ttl of -2147483648. Please specify integer greater than 0.

Ah you’re overflowing yeah that won’t work then. Looks like the max will be around the 68 year mark (Int max value - 2147483647)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.