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)
MD5 of the key.
Safely gets a value from memcached. Returns undef on cache errors.
Safely sets a value in memcached. Never throws on cache errors.
Get the results of a query from the cache.
The results of the query, or undef if the query was not found in the cache.
Set the results of a query in the cache.
Execute a component health check and return a health-check result object.
This sub documents the expected interface for health checks used by ProductOpener::APIHealth.
Implementations should perform one focused check and return an array reference of check objects compatible with https://inadarei.github.io/rfc-healthcheck/.
Each check object in the returned array reference must include:
status
String indicating the check result.
Expected values are pass,
warn or fail.
output
Human-readable message describing the outcome.
Additional RFC fields (for example componentType,
time,
observedValue,
observedUnit and links) may be included when relevant.
If componentId is included,
it should be a stable UUID.
The sub should not die.
If an internal error occurs,
return one check object with status => 'fail' and a meaningful output message.