/**
  * @param AJXP_Node $node
  * @param AJXP_Node $contextNode
  * @param bool $details
  */
 public function cacheNodeInfo(&$node, $contextNode, $details)
 {
     $cDriver = ConfService::getCacheDriverImpl();
     if (empty($cDriver) || !$cDriver->supportsPatternDelete(AJXP_CACHE_SERVICE_NS_NODES)) {
         return;
     }
     $id = $this->computeId($node, $details);
     CacheService::save(AJXP_CACHE_SERVICE_NS_NODES, $id, $node->getNodeInfoMeta());
 }
 public function save($context = "superuser")
 {
     $this->_save($context);
     CacheService::save("shared", "pydio:user:" . $this->getId(), $this);
 }
 /**
  * See static method
  * @param string $oldId
  * @param Repository $oRepositoryObject
  * @return int
  */
 public function replaceRepositoryInst($oldId, $oRepositoryObject)
 {
     AJXP_Controller::applyHook("workspace.before_update", array($oRepositoryObject));
     $confStorage = self::getConfStorageImpl();
     $res = $confStorage->saveRepository($oRepositoryObject, true);
     if ($res == -1) {
         return -1;
     }
     AJXP_Controller::applyHook("workspace.after_update", array($oRepositoryObject));
     AJXP_Logger::info(__CLASS__, "Edit Repository", array("repo_name" => $oRepositoryObject->getDisplay()));
     $this->invalidateLoadedRepositories();
     CacheService::save(AJXP_CACHE_SERVICE_NS_SHARED, "repository:" . $oRepositoryObject->getId(), $oRepositoryObject);
     return 0;
 }
 /**
  * Set a cache key value.
  *
  * @param string $key   Key to set
  * @param mixed  $value Value to set.
  * @param int    $ttl   Number of seconds the item is allowed to live. Set
  *                      to 0 to allow an unlimited lifetime.
  */
 public function set($key, $value, $ttl = 0)
 {
     \CacheService::save(AJXP_CACHE_SERVICE_NS_NODES, $key, $value, $ttl);
 }
 public function url_stat($path, $flags)
 {
     $id = $this->computeCacheId($path, "stat");
     if (CacheService::contains(AJXP_CACHE_SERVICE_NS_NODES, $id)) {
         $stat = CacheService::fetch(AJXP_CACHE_SERVICE_NS_NODES, $id);
         if (is_array($stat)) {
             return $stat;
         }
     }
     $stat = parent::url_stat($path, $flags);
     CacheService::save(AJXP_CACHE_SERVICE_NS_NODES, $id, $stat);
     return $stat;
 }