Next: Always, Up: Sleep strategies [Contents][Index]
The least recently used strategy (provided by the (goblins
sleep-strategy lru) module) maintains a fixed size cache of awake
objects. When the cache is full, the least recently messaged objects
are expired from the cache and then put to sleep. LRU is a good
one-size-fits-most strategy; specialized workloads may require a
different strategy but LRU is a safe default choice.
Return a new instance of the LRU sleep strategy that retains max-objects in its internal cache. When the cache is full, the least recently used objects will be put to sleep.