2014-01-08 18:18:12 +04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OCP;
|
|
|
|
|
2014-01-24 19:01:19 +04:00
|
|
|
interface ICacheFactory{
|
2014-01-08 18:18:12 +04:00
|
|
|
/**
|
2014-01-09 16:54:50 +04:00
|
|
|
* Get a memory cache instance
|
|
|
|
*
|
2014-01-24 19:01:19 +04:00
|
|
|
* All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps
|
|
|
|
*
|
2014-01-08 18:18:12 +04:00
|
|
|
* @param string $prefix
|
2014-01-24 19:01:19 +04:00
|
|
|
* @return \OCP\ICache
|
2014-01-08 18:18:12 +04:00
|
|
|
*/
|
|
|
|
public function create($prefix = '');
|
2014-01-09 16:54:50 +04:00
|
|
|
|
|
|
|
/**
|
2014-01-24 19:01:19 +04:00
|
|
|
* Check if any memory cache backend is available
|
2014-01-09 16:54:50 +04:00
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isAvailable();
|
2014-01-08 18:18:12 +04:00
|
|
|
}
|