Skip to content
Snippets Groups Projects
Commit 6217bcf9 authored by Josef Moravec's avatar Josef Moravec Committed by Robert Lange
Browse files

Fix cache key in ObalkyKnihService class

parent c478a94e
No related merge requests found
......@@ -106,15 +106,11 @@ class ObalkyKnihService implements \VuFindHttp\HttpServiceAwareInterface,
*/
protected function createCacheKey(array $ids)
{
array_walk(
$ids, function (&$value, $key) {
if (gettype($value) === 'object') {
$value = $value->get13();
}
$value = "$key::$value";
}
);
return implode("%%", $ids);
$key = $ids['recordid'];
$key = !empty($key) ? $key
: (isset($ids['isbn']) ? $ids['isbn']->get13() : null);
$key = !empty($key) ? $key : sha1(json_encode($ids));
return $key;
}
/**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment