ICacheFactory

interface OCP\ICacheFactory
Interface ICacheFactory
Implemented by:OC\Memcache\Factory
Source:lib/public/ICacheFactory.php#33

Methods

public OCP\ICacheFactory::create($prefix="")
Get a distributed memory cache instance
All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps
Source:

lib/public/ICacheFactory.php#44

Parameters:
  • $prefix (string)
Returns:

\OCP\ICache

Since:

7.0.0

Deprecated:

13.0.0 Use either createLocking, createDistributed or createLocal

public OCP\ICacheFactory::isAvailable()
Check if any memory cache backend is available
Source:lib/public/ICacheFactory.php#52
Returns:bool
Since:7.0.0
public OCP\ICacheFactory::isLocalCacheAvailable()
Check if a local memory cache backend is available
Source:lib/public/ICacheFactory.php#60
Returns:bool
Since:14.0.0
public OCP\ICacheFactory::createLocking($prefix="")
create a cache instance for storing locks
Source:

lib/public/ICacheFactory.php#69

Parameters:
  • $prefix (string)
Returns:

\OCP\IMemcache

Since:

13.0.0

public OCP\ICacheFactory::createDistributed($prefix="")
create a distributed cache instance
Source:

lib/public/ICacheFactory.php#78

Parameters:
  • $prefix (string)
Returns:

\OCP\ICache

Since:

13.0.0

public OCP\ICacheFactory::createLocal($prefix="")
create a local cache instance
Source:

lib/public/ICacheFactory.php#87

Parameters:
  • $prefix (string)
Returns:

\OCP\ICache

Since:

13.0.0