Redis mark key volatile infinite expiration -




i want mark keys volatile dont want redis expire them unless hit max memory configuration.

is possible mark key volatile infinite value?

edit

i searched googles , mailing list , not finding anything

if in case, there no need normal key expiration, try trick method. but if want expire keys in normal ways, method wrong.

set memory-policy volatile-ttl can

evict keys expire set, , try evict keys shorter time live (ttl) first, in order make space new data added.

and use expire command on volatile keys.

expire volatile-key infinite-time 

the infinite-time should big make sure key not expired in normal way.

then if redis server reaches maxmemory, follow volatile-ttl policy , remove oldest volatile-key define first.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -