Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add flush method #8

Closed
wants to merge 2 commits into from

2 participants

@aarondfrancis

I added a flush method

@ronnywang
Owner

From Coding Style Guide PSR-2

  • The closing ?> tag MUST be omitted from files containing only PHP.
  • Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 4, 2013
  1. @aarondfrancis

    Add flush method

    aarondfrancis authored
  2. @aarondfrancis

    readme

    aarondfrancis authored
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 0 deletions.
  1. +13 −0 MemcacheSASL.php
  2. +2 −0  README
View
13 MemcacheSASL.php
@@ -247,6 +247,17 @@ public function delete($key)
return FALSE;
}
+
+ public function flush()
+ {
+ $sent = $this->_send(array(
+ 'opcode' => 0x08
+ ));
+ $data = $this->_recv();
+ if($data['status'] == 0){
+ return TRUE;
+ }
+ }
public function replace($key, $value, $expiration = 0)
{
@@ -438,3 +449,5 @@ function($lifetime) { // gc
);
}
}
+
+?>
View
2  README
@@ -1,4 +1,6 @@
Memcache class with SASL support
+----
+A fork of [ronnywang's PHPMemcacheSASL](https://github.com/ronnywang/PHPMemcacheSASL) that includes a flush option. Added to interface with Yii's Cache component
Memcache Binary Protocol
http://code.google.com/p/memcached/wiki/BinaryProtocolRevamped
Something went wrong with that request. Please try again.