diff options
author | Robin Appelman <robin@icewind.nl> | 2020-11-13 17:04:36 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-11-26 15:22:03 +0100 |
commit | 23fb497ff59a90813cba24ca1c82be979cf95046 (patch) | |
tree | 2c56eb189e025d098f7c89539416936014ae9522 /lib/public/Files | |
parent | 54e3beba165739c480730f797e2b386b12a92713 (diff) | |
download | nextcloud-server-23fb497ff59a90813cba24ca1c82be979cf95046.tar.gz nextcloud-server-23fb497ff59a90813cba24ca1c82be979cf95046.zip |
extend cache events
- adds cache remove event
- expose storage id in event
- emit events during cache move
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/public/Files')
-rw-r--r-- | lib/public/Files/Cache/CacheRemoveEvent.php | 34 | ||||
-rw-r--r-- | lib/public/Files/Cache/ICacheEvent.php | 6 |
2 files changed, 40 insertions, 0 deletions
diff --git a/lib/public/Files/Cache/CacheRemoveEvent.php b/lib/public/Files/Cache/CacheRemoveEvent.php new file mode 100644 index 00000000000..3b1e536f471 --- /dev/null +++ b/lib/public/Files/Cache/CacheRemoveEvent.php @@ -0,0 +1,34 @@ +<?php + +declare(strict_types=1); +/** + * @copyright Copyright (c) 2020 Robin Appelman <robin@icewind.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCP\Files\Cache; + +use OC\Files\Cache\AbstractCacheEvent; + +/** + * Event for when an existing entry in the cache gets removed + * + * @since 21.0.0 + */ +class CacheRemoveEvent extends AbstractCacheEvent { +} diff --git a/lib/public/Files/Cache/ICacheEvent.php b/lib/public/Files/Cache/ICacheEvent.php index 634666f594a..56f6f46df1c 100644 --- a/lib/public/Files/Cache/ICacheEvent.php +++ b/lib/public/Files/Cache/ICacheEvent.php @@ -56,4 +56,10 @@ interface ICacheEvent { * @since 16.0.0 */ public function getFileId(): int; + + /** + * @return int + * @since 21.0.0 + */ + public function getStorageId(): int; } |