IMemcache

interface OCP\IMemcache
This interface defines method for accessing the file based user cache.
Implemented by:OC\Memcache\Memcached OC\Memcache\APCu OC\Memcache\ArrayCache OC\Memcache\NullCache
Source:lib/public/IMemcache.php#39
Parent:OCP\ICache

Methods

public OCP\IMemcache::add($key, $value, $ttl=0)
Set a value in the cache if it’s not already stored
Source:

lib/public/IMemcache.php#49

Parameters:
  • $key (string)
  • $value (mixed)
  • $ttl (int) Time To Live in seconds. Defaults to 60*60*24
Returns:

bool

Since:

8.1.0

public OCP\IMemcache::inc($key, $step=1)
Increase a stored number
Source:

lib/public/IMemcache.php#59

Parameters:
  • $key (string)
  • $step (int)
Returns:

int | bool

Since:

8.1.0

public OCP\IMemcache::dec($key, $step=1)
Decrease a stored number
Source:

lib/public/IMemcache.php#69

Parameters:
  • $key (string)
  • $step (int)
Returns:

int | bool

Since:

8.1.0

public OCP\IMemcache::cas($key, $old, $new)
Compare and set
Source:

lib/public/IMemcache.php#80

Parameters:
  • $key (string)
  • $old (mixed)
  • $new (mixed)
Returns:

bool

Since:

8.1.0

public OCP\IMemcache::cad($key, $old)
Compare and delete
Source:

lib/public/IMemcache.php#90

Parameters:
  • $key (string)
  • $old (mixed)
Returns:

bool

Since:

8.1.0