Nextcloud PHP API (stable19)

ICacheFactory

Interface ICacheFactory

Tags
since
7.0.0

Table of Contents

create()  : ICache
Get a distributed memory cache instance
createDistributed()  : ICache
create a distributed cache instance
createLocal()  : ICache
create a local cache instance
createLocking()  : IMemcache
create a cache instance for storing locks
isAvailable()  : bool
Check if any memory cache backend is available
isLocalCacheAvailable()  : bool
Check if a local memory cache backend is available

Methods

create()

Get a distributed memory cache instance

public create([string $prefix = '' ]) : ICache

All entries added trough the cache instance will be namespaced by $prefix to prevent collisions between apps

Parameters
$prefix : string = ''
Tags
since
7.0.0
deprecated
13.0.0

Use either createLocking, createDistributed or createLocal

Return values
ICache

createDistributed()

create a distributed cache instance

public createDistributed([string $prefix = '' ]) : ICache
Parameters
$prefix : string = ''
Tags
since
13.0.0
Return values
ICache

createLocal()

create a local cache instance

public createLocal([string $prefix = '' ]) : ICache
Parameters
$prefix : string = ''
Tags
since
13.0.0
Return values
ICache

createLocking()

create a cache instance for storing locks

public createLocking([string $prefix = '' ]) : IMemcache
Parameters
$prefix : string = ''
Tags
since
13.0.0
Return values
IMemcache

isAvailable()

Check if any memory cache backend is available

public isAvailable() : bool
Tags
since
7.0.0
Return values
bool

isLocalCacheAvailable()

Check if a local memory cache backend is available

public isLocalCacheAvailable() : bool
Tags
since
14.0.0
Return values
bool

Search results