mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
Instead of creating a CacheEntryRemovedEvent for each deleted files, create a single CacheEntriesRemovedEvent which wrap multiple CacheEntryRemovedEvent. This allow listener to optimize the query they do when multiple files are deleted at the same time (e.g. when deleting a folder). Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
21 lines
516 B
PHP
21 lines
516 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
namespace OCP\Files\Cache;
|
|
|
|
/**
|
|
* Event for when an existing entry in the cache gets removed
|
|
*
|
|
* Prefer using \c CacheEntriesRemovedEvent as it is more efficient when deleting
|
|
* multiple files at the same time.
|
|
*
|
|
* @since 21.0.0
|
|
* @see CacheEntriesRemovedEvent
|
|
*/
|
|
class CacheEntryRemovedEvent extends AbstractCacheEvent implements ICacheEvent {
|
|
}
|