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#41
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#51

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#61

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#71

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#82

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#92

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

bool

Since:

8.1.0