According to Memcached, the following occurs when an attempt to assign a value to the cache is executed and access to the memory limit :
Items cached from cache are removed from the cache?
Memkad uses a lazy termination, which means there is no extra CPU time expired in it. When an item is requested (request to receive) checks the expiration time to see if the item is valid even before returning to the customer.
Similarly, when adding a new item to the cache, if the items used to minimize the amount used in the cash cache will be seen before the expiry of the expiry of the items.
The question is, 'least used items' maintain a rank based on access to each key, or does it track access in a given period is?
For example. I add 2 items to the cache (A and B). Access patterns for A and B are different. I reach 5000 times every hour, while I use B once times. According to the documentation, it seems that if I try to add another object (C) after two hours and reach the maximum memory allocation, then B will be removed. That's because B has been reached only 7200 times, while A has been reached 10000 times.
Is that correct? If not, is there a sliding time window where access is detected? For example, if a window is 30 minutes, because it could be reached 0 times in the last 30 minutes, while B would reach 1800 times.
Any thoughts?
This is not the exact LRU. In general, any assumption about the availability of things in the cache Should not do it.
The exact LRU will be very expensive because things revolve around so many times. Instead, the memcach will not place any item on top of an LRU if it was recently done.
Comments
Post a Comment