ttl_cache v0.1.0 TTLCache.Expiration.SendAfter

Callback module for implementing key expiration via Process.send_after. This approach works by using the BEAM’s internal scheduling expire keys. Process.send_after will wait for some period of time and then send a message to the cache server. The cache server is configured to handle :expire messages and will delegate back to this module which will ensure that we’re properly filtering out irrelevant expire messages (i.e. when we “refresh” the expiration we are just incrementing a pointer/watermark and we ignore any previous messages)

Link to this section Summary

Link to this section Functions

Link to this function expire?(state, arg)

Callback implementation for TTLCache.Expiration.expire?/2.

Callback implementation for TTLCache.Expiration.init/1.

Link to this function on_delete(state, key)

Callback implementation for TTLCache.Expiration.on_delete/2.

Link to this function on_read(state, key)

Callback implementation for TTLCache.Expiration.on_read/2.

Link to this function on_write(state, arg)

Callback implementation for TTLCache.Expiration.on_write/2.