/** * get a cache instance for the storage * * @param string $path * @param \OC\Files\Storage\Storage (optional) the storage to pass to the cache * @return \OC\Files\Cache\Cache */ public function getCache($path = '', $storage = null) { if (!$storage) { $storage = $this; } $sourceCache = parent::getCache($path, $storage); return new CachePermissionsMask($sourceCache, $this->mask); }