nextcloud/lib/private/Memcache/NullCache.php

60 lines
979 B
PHP
Raw Permalink Normal View History

2015-01-09 08:12:21 -05:00
<?php
2015-01-09 08:12:21 -05: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;
}
public function add($key, $value, $ttl = 0) {
return true;
}
public function inc($key, $step = 1) {
return true;
}
public function dec($key, $step = 1) {
return true;
}
public function cas($key, $old, $new) {
return true;
}
public function cad($key, $old) {
return true;
}
public function ncad(string $key, mixed $old): bool {
return true;
}
2015-01-09 08:12:21 -05:00
public function clear($prefix = '') {
return true;
}
public static function isAvailable(): bool {
2015-01-09 08:12:21 -05:00
return true;
}
}