<<

FUNCTIONS

generate_cache_key($name, $context_ref)

Generate a key to use for caching, that depends on the content of the $context_ref object. The key is prepended by the name of the variable we want to store, so that we can set multiple variables for the same context (e.g. a count of search results + the search results themselves)

Arguments

$name Name of the variable we want to cache.

$object_ref Reference to all the context / parameters etc. that have an influence on what we want to cache

Return values

MD5 of the key.

get_cache_results ($key, $data_debug_ref)

Get the results of a query from the cache.

Arguments

$key

$data_debug_ref Reference to a string that will be appended with debug information

Return values

The results of the query, or undef if the query was not found in the cache.

set_cache_results ($key, $results, $data_debug_ref)

Set the results of a query in the cache.

Arguments

$key

$results

$data_debug_ref Reference to a string that will be appended with debug information

Return values

<<