MediaWiki  1.34.0
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  protected function doSet( $key, $value, $exptime = 0, $flags = 0 ) {
37  return true;
38  }
39 
40  protected function doDelete( $key, $flags = 0 ) {
41  return true;
42  }
43 
44  protected function doAdd( $key, $value, $exptime = 0, $flags = 0 ) {
45  return true;
46  }
47 
48  public function incr( $key, $value = 1, $flags = 0 ) {
49  return false;
50  }
51 
52  public function decr( $key, $value = 1, $flags = 0 ) {
53  return false;
54  }
55 
56  public function incrWithInit( $key, $exptime, $value = 1, $init = null, $flags = 0 ) {
57  return false; // faster
58  }
59 
60  public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
61  return true; // faster
62  }
63 }
EmptyBagOStuff\doDelete
doDelete( $key, $flags=0)
Delete an item.
Definition: EmptyBagOStuff.php:40
EmptyBagOStuff\merge
merge( $key, callable $callback, $exptime=0, $attempts=10, $flags=0)
Merge changes into the existing cache value (possibly creating a new one)
Definition: EmptyBagOStuff.php:60
EmptyBagOStuff
A BagOStuff object with no objects in it.
Definition: EmptyBagOStuff.php:29
EmptyBagOStuff\doAdd
doAdd( $key, $value, $exptime=0, $flags=0)
Insert an item if it does not already exist.
Definition: EmptyBagOStuff.php:44
MediumSpecificBagOStuff
Storage medium specific cache for storing items (e.g.
Definition: MediumSpecificBagOStuff.php:34
EmptyBagOStuff\doGet
doGet( $key, $flags=0, &$casToken=null)
Definition: EmptyBagOStuff.php:30
EmptyBagOStuff\decr
decr( $key, $value=1, $flags=0)
Decrease stored value of $key by $value while preserving its TTL.
Definition: EmptyBagOStuff.php:52
EmptyBagOStuff\incr
incr( $key, $value=1, $flags=0)
Increase stored value of $key by $value while preserving its TTL.
Definition: EmptyBagOStuff.php:48
EmptyBagOStuff\doSet
doSet( $key, $value, $exptime=0, $flags=0)
Set an item.
Definition: EmptyBagOStuff.php:36
EmptyBagOStuff\incrWithInit
incrWithInit( $key, $exptime, $value=1, $init=null, $flags=0)
Increase the value of the given key (no TTL change) if it exists or create it otherwise.
Definition: EmptyBagOStuff.php:56