Cache\Backend\Libmemcached::flush

public flush ()

Immediately invalidates all existing items. Memcached does not support flush() per default. If you require flush() support, set $config[“statsKey”]. All modified keys are stored in “statsKey”. Note: statsKey has a negative performance impact.

1
2
3
4
5
$cache = new \Phalcon\Cache\Backend\Libmemcached($frontCache, ["statsKey" => "_PHCM"]);
 $cache->save('my-data', array(1, 2, 3, 4, 5));
 
 //'my-data' and all other used keys are deleted
 $cache->flush();
doc_Phalcon
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.