2014-01-08 14:18:12 +00: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 15:01:19 +00:00
|
|
|
interface ICacheFactory{
|
2014-01-08 14:18:12 +00:00
|
|
|
/**
|
2014-01-09 12:54:50 +00:00
|
|
|
* Get a memory cache instance
|
|
|
|
*
|
2014-01-24 15:01:19 +00:00
|
|
|
* All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps
|
|
|
|
*
|
2014-01-08 14:18:12 +00:00
|
|
|
* @param string $prefix
|
2014-01-24 15:01:19 +00:00
|
|
|
* @return \OCP\ICache
|
2014-01-08 14:18:12 +00:00
|
|
|
*/
|
|
|
|
public function create($prefix = '');
|
2014-01-09 12:54:50 +00:00
|
|
|
|
|
|
|
/**
|
2014-01-24 15:01:19 +00:00
|
|
|
* Check if any memory cache backend is available
|
2014-01-09 12:54:50 +00:00
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function isAvailable();
|
2014-01-08 14:18:12 +00:00
|
|
|
}
|