1
0
mirror of https://github.com/owncloudarchive/contacts.git synced 2024-12-10 21:24:33 +01:00

Use thumbnail cache instead of refreshing every time

This commit is contained in:
LEDfan 2014-12-20 11:16:40 +01:00
parent 2a794dfdc8
commit 5dab5fd68c

View File

@ -293,12 +293,19 @@ Class Properties {
$cache = \OC::$server->getCache();
$key = self::THUMBNAIL_PREFIX . $backendName . '::' . $addressBookId . '::' . $contactId;
//$cache->remove($key);
if ($cache->hasKey($key) && $image === null
&& (isset($options['remove']) && $options['remove'] === false)
&& (isset($options['update']) && $options['update'] === false)) {
return $cache->get($key);
$haskey = $cache->hasKey($key);
if (!array_key_exists($options, 'remove') && !array_key_exists($options, 'update')){
if ($cache->hasKey($key) && $image === null){
return $cache->get($key);
}
} else {
if ($options['remove'] === false && $options['update'] === false){
return $cache->get($key);
}
}
if (isset($options['remove']) && $options['remove']) {
$cache->remove($key);
if(!isset($options['update']) || !$options['update']) {