3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 class CRM_Utils_Cache_NoCache
implements CRM_Utils_Cache_Interface
{
19 // TODO Consider native implementation.
20 use CRM_Utils_Cache_NaiveMultipleTrait
;
21 // TODO Native implementation
22 use CRM_Utils_Cache_NaiveHasTrait
;
25 * We only need one instance of this object. So we use the singleton
26 * pattern and cache the instance in this variable
30 static private $_singleton = NULL;
35 * @param array $config
36 * An array of configuration params.
38 * @return \CRM_Utils_Cache_NoCache
40 public function __construct($config) {
46 * @param null|int|\DateInterval $ttl
50 public function set($key, $value, $ttl = NULL) {
56 * @param mixed $default
60 public function get($key, $default = NULL) {
69 public function delete($key) {
76 public function flush() {
80 public function clear() {
81 return $this->flush();