MediaWiki  1.23.12
WinCacheBagOStuff Class Reference

Wrapper for WinCache object caching functions; identical interface to the APC wrapper. More...

Inheritance diagram for WinCacheBagOStuff:
Collaboration diagram for WinCacheBagOStuff:

Public Member Functions

 cas ( $casToken, $key, $value, $exptime=0)
 Store a value in the WinCache object cache, race condition-safe. More...
 
 delete ( $key, $time=0)
 Remove a value from the WinCache object cache. More...
 
 get ( $key, &$casToken=null)
 Get a value from the WinCache object cache. More...
 
 set ( $key, $value, $expire=0)
 Store a value in the WinCache object cache. More...
 
- Public Member Functions inherited from BagOStuff
 add ( $key, $value, $exptime=0)
 
 clearLastError ()
 Clear the "last error" registry. More...
 
 debug ( $text)
 
 decr ( $key, $value=1)
 Decrease stored value of $key by $value while preserving its TTL. More...
 
 deleteObjectsExpiringBefore ( $date, $progressCallback=false)
 Delete all objects expiring before a certain date. More...
 
 getLastError ()
 Get the "last error" registered; clearLastError() should be called manually. More...
 
 getMulti (array $keys)
 Get an associative array containing the item for each of the keys that have items. More...
 
 incr ( $key, $value=1)
 Increase stored value of $key by $value while preserving its TTL. More...
 
 lock ( $key, $timeout=6)
 
 merge ( $key, closure $callback, $exptime=0, $attempts=10)
 Merge changes into the existing cache value (possibly creating a new one). More...
 
 replace ( $key, $value, $exptime=0)
 
 setDebug ( $bool)
 
 unlock ( $key)
 

Additional Inherited Members

- Public Attributes inherited from BagOStuff
const ERR_NO_RESPONSE = 1
 
const ERR_NONE = 0
 Possible values for getLastError() More...
 
const ERR_UNEXPECTED = 3
 
const ERR_UNREACHABLE = 2
 
- Protected Member Functions inherited from BagOStuff
 convertExpiry ( $exptime)
 Convert an optionally relative time to an absolute time. More...
 
 convertToRelative ( $exptime)
 Convert an optionally absolute expiry time to a relative time. More...
 
 isInteger ( $value)
 Check if a value is an integer. More...
 
 mergeViaCas ( $key, closure $callback, $exptime=0, $attempts=10)
 
 mergeViaLock ( $key, closure $callback, $exptime=0, $attempts=10)
 
 setLastError ( $err)
 Set the "last error" registry. More...
 
- Protected Attributes inherited from BagOStuff
 $lastError = self::ERR_NONE
 

Detailed Description

Wrapper for WinCache object caching functions; identical interface to the APC wrapper.

Definition at line 30 of file WinCacheBagOStuff.php.

Member Function Documentation

◆ cas()

WinCacheBagOStuff::cas (   $casToken,
  $key,
  $value,
  $exptime = 0 
)

Store a value in the WinCache object cache, race condition-safe.

Parameters
int$casTokencas token
string$keycache key
int$valueobject to store
int$exptimeexpiration time
Returns
bool

Reimplemented from BagOStuff.

Definition at line 76 of file WinCacheBagOStuff.php.

References $value.

◆ delete()

WinCacheBagOStuff::delete (   $key,
  $time = 0 
)

Remove a value from the WinCache object cache.

Parameters
string$keycache key
int$timenot used in this implementation
Returns
bool

Reimplemented from BagOStuff.

Definition at line 87 of file WinCacheBagOStuff.php.

◆ get()

WinCacheBagOStuff::get (   $key,
$casToken = null 
)

Get a value from the WinCache object cache.

Parameters
string$keycache key
$casToken[optional]int: cas token
Returns
mixed

Reimplemented from BagOStuff.

Definition at line 39 of file WinCacheBagOStuff.php.

◆ set()

WinCacheBagOStuff::set (   $key,
  $value,
  $expire = 0 
)

Store a value in the WinCache object cache.

Parameters
string$keycache key
$valueMixed: object to store
int$expireexpiration time
Returns
bool

Reimplemented from BagOStuff.

Definition at line 59 of file WinCacheBagOStuff.php.

References $value, and array().


The documentation for this class was generated from the following file: