2015-01-09 08:12:21 -05:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2015-01-09 08:12:21 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-01-09 08:12:21 -05:00
|
|
|
*/
|
|
|
|
|
namespace OC\Memcache;
|
|
|
|
|
|
2015-06-10 18:44:13 -04:00
|
|
|
class NullCache extends Cache implements \OCP\IMemcache {
|
2015-01-09 08:12:21 -05:00
|
|
|
public function get($key) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function set($key, $value, $ttl = 0) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function hasKey($key) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function remove($key) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-21 07:06:20 -04:00
|
|
|
public function add($key, $value, $ttl = 0) {
|
2015-05-13 05:03:38 -04:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-21 07:06:20 -04:00
|
|
|
public function inc($key, $step = 1) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function dec($key, $step = 1) {
|
2015-05-13 05:03:38 -04:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function cas($key, $old, $new) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-08 09:25:23 -04:00
|
|
|
public function cad($key, $old) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-15 09:27:41 -04:00
|
|
|
public function ncad(string $key, mixed $old): bool {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2015-01-09 08:12:21 -05:00
|
|
|
public function clear($prefix = '') {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-19 17:30:34 -05:00
|
|
|
public static function isAvailable(): bool {
|
2015-01-09 08:12:21 -05:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|