Memcached for storing IN-MEMORY

Does memcached keep the persistent storage of IN-MEMORY objects as long as it runs, and the available configured memory space?

An example is storing session data for messaging systems. Under what circumstances will I try to read the memcached key (which I wrote earlier, without timeouts for data against this key) and get an empty answer? what is the behavior of memcached when the configured memory is exceeded (will it be replaced with some data and what data will be replaced)?

+1
source share
2 answers

I ran into this problem and you cannot predict what data will be deleted. The paged data depends on the size of the new data that you are going to cache, and on the size of the slab and piece in memcached memory.

+1
source

memcached never guarantees that it will return something that you have stored in it. Like a cache, it only guarantees that it will not return data that you did not say that it was valid (or said that it was invalid).

+1
source

Source: https://habr.com/ru/post/945744/


All Articles