Memcache::flush does not delete query keys #12182

Closed
sergeyklay opened this Issue Aug 30, 2016 · 1 comment

Projects

None yet

1 participant

@sergeyklay
Collaborator
sergeyklay commented Aug 30, 2016 edited

Expected and Actual Behavior

The Phalcon\Cache\Backend\Memcache::flush should delete keys by using statsKey

use Phalcon\Cache\Frontend\Data;
use Phalcon\Cache\Backend\Memcache;

$cache = new Memcache(new Data(['lifetime' => 20]), [
    'host'     => 'localhost',
    'port'     => 11211,
    'statsKey' => '_PHCM',
]);

$cache->save('data-flush-1', 1);
$cache->save('data-flush-2', 2);

$cache->flush();

Actual

telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
get _PHCM
VALUE _PHCM 1 56
a:2:{s:12:"data-flush-1";i:1;s:12:"data-flush-2";i:2;}

Expected

telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
get _PHCM
END

Details

  • Phalcon version: 3.0.2-dev
  • PHP Version: 7.0.9
  • Operating System: Ubuntu
  • Installation type: Compiling from source
  • Zephir version: 0.9.4a-dev
  • Server: Nginx
@sergeyklay sergeyklay added this to the 3.0.2 milestone Aug 30, 2016
@sergeyklay sergeyklay self-assigned this Aug 30, 2016
@sergeyklay
Collaborator

Fixed in the 3.0.x branch.

@sergeyklay sergeyklay closed this Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment