Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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 }
put($key, $value)
Definition: Noop.php:32
invalidate($key)
Definition: Noop.php:27
Implements the caching API but doesn't actually do any caching.
Definition: Noop.php:17
$value
Definition: longtext.php:26
$default
Definition: checkbox.php:35
$key
Definition: summary.php:34