Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add support for delete function

  • Loading branch information...
commit 77c7b9c78d8af44d4e516de19edfb0d360789eff 1 parent 2423515
@tarjei authored
Showing with 9 additions and 2 deletions.
  1. +9 −2 MockMemcache.php
View
11 MockMemcache.php
@@ -62,6 +62,15 @@ public function setMulti($keys, $exp) {
}
}
+
+ public function delete ( $key , $timeout = 0 ) {
+ if(isset($this->_cache[$key])){
+ unset($this->_cache[$key]);
+ return true;
+ }
+ return false;
+ }
+
public function addServer ( $host , $port = 11211 , $persistent , $weight , $timeout , $retry_interval , $status , $failure_callback , $timeoutms ) {
}
public function close () {
@@ -70,8 +79,6 @@ public function connect ( $host , $port , $timeout ) {
}
public function decrement ( $key , $value = 1 ) {
}
- public function delete ( $key , $timeout = 0 ) {
- }
public function flush ( ) {
}
public function getExtendedStats ( $type , $slabid , $limit = 100 ) {
Please sign in to comment.
Something went wrong with that request. Please try again.