31 protected function doGet( $key, $flags = 0, &$casToken =
null ) {
47 protected function cas( $casToken, $key,
$value, $exptime = 0, $flags = 0 ) {
53 $this->
doGet( $key, self::READ_LATEST, $curCasToken );
54 if ( $casToken === $curCasToken ) {
58 __METHOD__ .
' failed due to race condition for {key}.',
70 public function set( $key,
$value, $expire = 0, $flags = 0 ) {
76 return ( $result === [] || $result ===
true );
79 public function add( $key,
$value, $exptime = 0, $flags = 0 ) {
85 return ( $result === [] || $result ===
true );
88 public function delete( $key, $flags = 0 ) {
111 function ( $arg ) use ( &$charsLeft ) {
113 if ( $charsLeft > 33 &&
strlen( $arg ) > $charsLeft ) {
114 $arg =
'#' .
md5( $arg );
117 $charsLeft -=
strlen( $arg );
123 if ( $charsLeft < 0 ) {
141 $n = $this->
doGet( $key );
145 $this->
set( $key, $n,
$oldTTL );
unserialize( $serialized)
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Class representing a cache/ephemeral data store.
isInteger( $value)
Check if a value is an integer.
Wrapper for WinCache object caching functions; identical interface to the APC wrapper.
doGet( $key, $flags=0, &$casToken=null)
incr( $key, $value=1)
Increase stored value of $key by $value while preserving its original TTL.
makeKeyInternal( $keyspace, $args)
Construct a cache key.
add( $key, $value, $exptime=0, $flags=0)
Insert an item if it does not already exist.
cas( $casToken, $key, $value, $exptime=0, $flags=0)
Check and set an item.
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible true was required This is the default since MediaWiki *some string