increase cache lifetime for principal resolving
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 8 Jul 2015 15:36:47 +0000 (17:36 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 13 Jul 2015 11:04:44 +0000 (13:04 +0200)
Change-Id: I6c49909d8d4a260cb31053d9ef88a5949cd58df8
Reviewed-on: http://gerrit.tine20.com/customers/2025
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/WebDav/PrincipalBackend.php

index 69b1730..fd2d3ee 100644 (file)
@@ -347,7 +347,6 @@ class Tinebase_WebDav_PrincipalBackend implements \Sabre\DAVACL\PrincipalBackend
                         
                         return $result;
                     }
-                    
                     $result = array();
                     
                     $user = Tinebase_User::getInstance()->getUserByPropertyFromSqlBackend('contactId', $contactId);
@@ -388,9 +387,8 @@ class Tinebase_WebDav_PrincipalBackend implements \Sabre\DAVACL\PrincipalBackend
                             $result[] = self::PREFIX_USERS . '/' . self::SHARED . '/calendar-proxy-write';
                         }
                     }
-                    
                     Tinebase_Cache_PerRequest::getInstance()->save(__CLASS__, __FUNCTION__, $classCacheId, $result);
-                    $cache->save($result, $cacheId, array(), 60);
+                    $cache->save($result, $cacheId, array(), 60 * 3);
                 }
                 
                 break;
@@ -522,8 +520,8 @@ class Tinebase_WebDav_PrincipalBackend implements \Sabre\DAVACL\PrincipalBackend
                     )));
                 }
                 
-                #if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(
-                #    __METHOD__ . '::' . __LINE__ . ' path: ' . $prefixPath . ' properties: ' . print_r($filter->toArray(), true));
+                if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ .
+                    ' path: ' . $prefixPath . ' properties: ' . print_r($filter->toArray(), true));
                 
                 $result = Addressbook_Controller_Contact::getInstance()->search($filter, null, false, true);