summaryrefslogtreecommitdiffstats
path: root/lib/private/memcache/null.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/memcache/null.php')
-rw-r--r--lib/private/memcache/null.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/private/memcache/null.php b/lib/private/memcache/null.php
new file mode 100644
index 00000000000..62cd060aaca
--- /dev/null
+++ b/lib/private/memcache/null.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin McCorkell <rmccorkell@karoshi.org.uk>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Memcache;
+
+class Null extends Cache {
+ 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 clear($prefix = '') {
+ return true;
+ }
+
+ static public function isAvailable() {
+ return true;
+ }
+}