1
0

IPropagator.php 960 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCP\Files\Cache;
  8. /**
  9. * Propagate etags and mtimes within the storage
  10. *
  11. * @since 9.0.0
  12. */
  13. interface IPropagator {
  14. /**
  15. * Mark the beginning of a propagation batch
  16. *
  17. * Note that not all cache setups support propagation in which case this will be a noop
  18. *
  19. * Batching for cache setups that do support it has to be explicit since the cache state is not fully consistent
  20. * before the batch is committed.
  21. *
  22. * @since 9.1.0
  23. */
  24. public function beginBatch();
  25. /**
  26. * Commit the active propagation batch
  27. *
  28. * @since 9.1.0
  29. */
  30. public function commitBatch();
  31. /**
  32. * @param string $internalPath
  33. * @param int $time
  34. * @param int $sizeDifference
  35. * @since 9.0.0
  36. */
  37. public function propagateChange($internalPath, $time, $sizeDifference = 0);
  38. }