MediaWiki REL1_33
EmptyBagOStuff.php
Go to the documentation of this file.
1<?php
30 protected function doGet( $key, $flags = 0, &$casToken = null ) {
31 $casToken = null;
32
33 return false;
34 }
35
36 public function add( $key, $value, $exp = 0, $flags = 0 ) {
37 return true;
38 }
39
40 public function set( $key, $value, $exp = 0, $flags = 0 ) {
41 return true;
42 }
43
44 public function delete( $key, $flags = 0 ) {
45 return true;
46 }
47
48 public function incr( $key, $value = 1 ) {
49 return false;
50 }
51
52 public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
53 return true; // faster
54 }
55}
Class representing a cache/ephemeral data store.
Definition BagOStuff.php:58
A BagOStuff object with no objects in it.
add( $key, $value, $exp=0, $flags=0)
Insert an item if it does not already exist.
doGet( $key, $flags=0, &$casToken=null)
incr( $key, $value=1)
Increase stored value of $key by $value while preserving its TTL.
merge( $key, callable $callback, $exptime=0, $attempts=10, $flags=0)
Merge changes into the existing cache value (possibly creating a new one)