From 388376c077975b3c0ccf8d15d8288cb343510d07 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 19 Sep 2017 15:52:52 +0200 Subject: expose local and locking memcaches trough public interfaces Signed-off-by: Robin Appelman --- lib/public/ICacheFactory.php | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'lib') 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 = ''); } -- cgit v1.2.3