diff options
author | Robin Appelman <robin@icewind.nl> | 2017-09-19 15:52:52 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2017-09-20 14:16:22 +0200 |
commit | 388376c077975b3c0ccf8d15d8288cb343510d07 (patch) | |
tree | ce89dd1845f8aa0594271a69b308043f40793f07 /lib | |
parent | 1995c699284a1dc522ccb5d7035fd1dca277b10e (diff) | |
download | nextcloud-server-388376c077975b3c0ccf8d15d8288cb343510d07.tar.gz nextcloud-server-388376c077975b3c0ccf8d15d8288cb343510d07.zip |
expose local and locking memcaches trough public interfaces
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/public/ICacheFactory.php | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/public/ICacheFactory.php b/lib/public/ICacheFactory.php index 717fbc5e627..cc4d8fa3ec3 100644 --- a/lib/public/ICacheFactory.php +++ b/lib/public/ICacheFactory.php @@ -31,13 +31,14 @@ namespace OCP; */ interface ICacheFactory{ /** - * Get a memory cache instance + * Get a distributed memory cache instance * * All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps * * @param string $prefix * @return \OCP\ICache * @since 7.0.0 + * @deprecated 13.0.0 Use either createLocking, createDistributed or createLocal */ public function create($prefix = ''); @@ -48,4 +49,31 @@ interface ICacheFactory{ * @since 7.0.0 */ public function isAvailable(); + + /** + * create a cache instance for storing locks + * + * @param string $prefix + * @return \OCP\IMemcache + * @since 13.0.0 + */ + public function createLocking($prefix = ''); + + /** + * create a distributed cache instance + * + * @param string $prefix + * @return \OCP\ICache + * @since 13.0.0 + */ + public function createDistributed($prefix = ''); + + /** + * create a local cache instance + * + * @param string $prefix + * @return \OCP\ICache + * @since 13.0.0 + */ + public function createLocal($prefix = ''); } |