View Source Cachex.Policy.LRW.Evented (Cachex v3.6.0)

Evented least recently written eviction policy for Cachex.

This module implements an evented LRW eviction policy for Cachex, using a hook to listen for new key additions to a cache and enforcing bounds in a reactive way. This policy enforces cache bounds and limits far more accurately than other scheduled implementations, but comes at a higher memory cost (due to the message passing between hooks).

Link to this section Summary

Functions

Returns the actions this policy should listen on.

Returns the provisions this policy requires.

Link to this section Functions

@spec actions() :: [atom()]

Returns the actions this policy should listen on.

@spec provisions() :: [atom()]

Returns the provisions this policy requires.