If an item in memcached is set to never expire, is it exempt from LRU eviction?
The docs that I’ve seen don’t paint a clear picture as to which takes precedence. In my mind, it would be ideal (perhaps very complicated internally) to have LRU only apply to items that had an expiry > 0.
No, it is not exempt. Memcached is a cache, not persistent storage. Any item within it, or the entire cache itself may disappear at any moment (but it’s not likely unless it’s full, or there’s a major problem).
Under heavy memory pressure, the LRU algorithm will remove whatever it feels necessary.
If the system has no areas of expired data, it will throw away the least recently used block (slab) of memory.