mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-06 21:46:21 +01:00
Use thumbnail cache instead of refreshing every time
This commit is contained in:
parent
2a794dfdc8
commit
5dab5fd68c
@ -293,11 +293,18 @@ Class Properties {
|
|||||||
$cache = \OC::$server->getCache();
|
$cache = \OC::$server->getCache();
|
||||||
$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
|
$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
|
||||||
//$cache->remove($key);
|
//$cache->remove($key);
|
||||||
if ($cache->hasKey($key) && $image === null
|
$haskey = $cache->hasKey($key);
|
||||||
&& (isset($options['remove']) && $options['remove'] === false)
|
|
||||||
&& (isset($options['update']) && $options['update'] === false)) {
|
if (!array_key_exists($options, 'remove') && !array_key_exists($options, 'update')){
|
||||||
|
if ($cache->hasKey($key) && $image === null){
|
||||||
return $cache->get($key);
|
return $cache->get($key);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ($options['remove'] === false && $options['update'] === false){
|
||||||
|
return $cache->get($key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isset($options['remove']) && $options['remove']) {
|
if (isset($options['remove']) && $options['remove']) {
|
||||||
$cache->remove($key);
|
$cache->remove($key);
|
||||||
|
Loading…
Reference in New Issue
Block a user