diff options
author | Robin Appelman <robin@icewind.nl> | 2019-01-22 17:08:32 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2019-02-07 15:51:30 +0100 |
commit | 748bcd407b4079adeceff3455749ad1e4d316c9d (patch) | |
tree | 9ae604f077275240486ce5b6e4077f4635695f80 /lib/private/Files/Cache/Storage.php | |
parent | a1aa6ee70d45d359d7e277873106a668aa642305 (diff) | |
download | nextcloud-server-748bcd407b4079adeceff3455749ad1e4d316c9d.tar.gz nextcloud-server-748bcd407b4079adeceff3455749ad1e4d316c9d.zip |
add event for inserting cache entries
this provides a reliable way for apps to listen to new files
without the need to of cache wrappers to hook into inserts themselves
(something which isn't 100% reliable)
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Cache/Storage.php')
-rw-r--r-- | lib/private/Files/Cache/Storage.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Storage.php b/lib/private/Files/Cache/Storage.php index 794c4872c93..5b37c1f43f8 100644 --- a/lib/private/Files/Cache/Storage.php +++ b/lib/private/Files/Cache/Storage.php @@ -28,6 +28,8 @@ namespace OC\Files\Cache; +use OCP\Files\Storage\IStorage; + /** * Handle the mapping between the string and numeric storage ids * @@ -61,7 +63,7 @@ class Storage { * @throws \RuntimeException */ public function __construct($storage, $isAvailable = true) { - if ($storage instanceof \OC\Files\Storage\Storage) { + if ($storage instanceof IStorage) { $this->storageId = $storage->getId(); } else { $this->storageId = $storage; |