underlayer

Accessor for the next storage layer down.

key_mangle

Applies any modifications necessary to convert the query into a key suitable for this caching layer.

Takes the following parameters:

  • $query - the value to mangle

Returns the modified result (actual modification performed is implementation-dependent).

retrieve

Attempts to retrieve the given value from storage.

Takes the following parameters:

  • query - the query we're trying to find

  • on_success - what to do when we win

  • on_failure - how to deal with defeat

Returns $self.