icachefactory.php 605 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace OCP;
  9. interface ICacheFactory{
  10. /**
  11. * Get a memory cache instance
  12. *
  13. * All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps
  14. *
  15. * @param string $prefix
  16. * @return \OCP\ICache
  17. */
  18. public function create($prefix = '');
  19. /**
  20. * Check if any memory cache backend is available
  21. *
  22. * @return bool
  23. */
  24. public function isAvailable();
  25. }