aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-08-16 12:34:18 +0200
committerRobin Appelman <robin@icewind.nl>2024-02-09 14:00:26 +0100
commite50c176428440e94a4eacb8d36e28b4f5564f170 (patch)
tree1743048a20333861de2f339d5caed5a81ab16dc0 /apps/files_sharing/lib
parent7a91abb4396553836c4eaca369a6216c10e4a5d1 (diff)
downloadnextcloud-server-e50c176428440e94a4eacb8d36e28b4f5564f170.tar.gz
nextcloud-server-e50c176428440e94a4eacb8d36e28b4f5564f170.zip
also improe cache ci for shared cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Cache.php11
-rw-r--r--apps/files_sharing/lib/SharedStorage.php6
2 files changed, 10 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/Cache.php b/apps/files_sharing/lib/Cache.php
index 3011bc64669..5160b7e821a 100644
--- a/apps/files_sharing/lib/Cache.php
+++ b/apps/files_sharing/lib/Cache.php
@@ -28,12 +28,14 @@
*/
namespace OCA\Files_Sharing;
+use OC\Files\Cache\CacheDependencies;
use OC\Files\Cache\FailedCache;
use OC\Files\Cache\Wrapper\CacheJail;
use OC\Files\Search\SearchBinaryOperator;
use OC\Files\Search\SearchComparison;
use OC\Files\Storage\Wrapper\Jail;
use OC\User\DisplayNameCache;
+use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Search\ISearchBinaryOperator;
use OCP\Files\Search\ISearchComparison;
@@ -62,18 +64,19 @@ class Cache extends CacheJail {
public function __construct(
$storage,
ICacheEntry $sourceRootInfo,
- DisplayNameCache $displayNameCache,
+ CacheDependencies $dependencies,
IShare $share
) {
$this->storage = $storage;
$this->sourceRootInfo = $sourceRootInfo;
$this->numericId = $sourceRootInfo->getStorageId();
- $this->displayNameCache = $displayNameCache;
+ $this->displayNameCache = $dependencies->getDisplayNameCache();
$this->share = $share;
parent::__construct(
null,
- ''
+ '',
+ $dependencies,
);
}
@@ -98,7 +101,7 @@ class Cache extends CacheJail {
return $this->sourceRootInfo->getPath();
}
- public function getCache() {
+ public function getCache(): ICache {
if (is_null($this->cache)) {
$sourceStorage = $this->storage->getSourceStorage();
if ($sourceStorage) {
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index de49e3c4294..53e9f60947e 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -32,6 +32,7 @@
*/
namespace OCA\Files_Sharing;
+use OC\Files\Cache\CacheDependencies;
use OC\Files\Cache\FailedCache;
use OC\Files\Cache\NullWatcher;
use OC\Files\Cache\Watcher;
@@ -40,7 +41,6 @@ use OC\Files\Storage\Common;
use OC\Files\Storage\FailedStorage;
use OC\Files\Storage\Home;
use OC\Files\Storage\Wrapper\PermissionsMask;
-use OC\User\DisplayNameCache;
use OC\User\NoUserException;
use OCA\Files_External\Config\ExternalMountPoint;
use OCP\Constants;
@@ -410,10 +410,10 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
return new FailedCache();
}
- $this->cache = new \OCA\Files_Sharing\Cache(
+ $this->cache = new Cache(
$storage,
$sourceRoot,
- \OC::$server->get(DisplayNameCache::class),
+ \OC::$server->get(CacheDependencies::class),
$this->getShare()
);
return $this->cache;