FileCacheBackendInterface.php 749 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace Drupal\Component\FileCache;
  3. /**
  4. * Defines an interface inspired by APCu for FileCache backends.
  5. */
  6. interface FileCacheBackendInterface {
  7. /**
  8. * Fetches data from the cache backend.
  9. *
  10. * @param array $cids
  11. * The cache IDs to fetch.
  12. *
  13. * @return array
  14. * An array containing cache entries keyed by cache ID.
  15. */
  16. public function fetch(array $cids);
  17. /**
  18. * Stores data into a cache backend.
  19. *
  20. * @param string $cid
  21. * The cache ID to store data to.
  22. * @param mixed $data
  23. * The data to store.
  24. */
  25. public function store($cid, $data);
  26. /**
  27. * Deletes data from a cache backend.
  28. *
  29. * @param string $cid
  30. * The cache ID to delete.
  31. */
  32. public function delete($cid);
  33. }