Elgg  Version 2.3
Noop.php
Go to the documentation of this file.
1 <?php
2 namespace Elgg\Cache\Pool;
3 
5 
17 final class Noop implements Pool {
19  public function get($key, callable $callback = null, $default = null) {
20  if (!$callback) {
21  return $default;
22  }
23  return call_user_func($callback);
24  }
25 
27  public function invalidate($key) {
28  // values are always expired, so nothing to do
29  }
30 
32  public function put($key, $value) {
33  // values are always expired, so nothing to do
34  }
35 }
Implements the caching API but doesn't actually do any caching.
Definition: Noop.php:17
invalidate($key)
@inheritDoc
Definition: Noop.php:27
put($key, $value)
@inheritDoc
Definition: Noop.php:32
$default
Definition: checkbox.php:34
$value
Definition: longtext.php:42
$key
Definition: summary.php:34