Closed darkalchemy closed 6 years ago
Hey @darkalchemy I won't add such method to the KeyValueStore interface because:
However... Scrapbook is "only a layer of standardization" on top of specific cache clients. While this type of info is hard/impossible to standardize across different adapters, you could fetch these stats from the client directly (if available from the client):
// create \Memcached object pointing to your Memcached server
$client = new \Memcached();
$client->addServer('localhost', 11211);
// create Scrapbook cache object
$cache = new \MatthiasMullie\Scrapbook\Adapters\Memcached($client);
// do operations with Scrapbook
$cache->set('key', 'value');
$cache->get('key');
// get stats directly from Memcached client
var_dump($client->getStats());
I thought that might be the case.
Thank you
Would it be possible to add a method to provide cache stats such as hits, misses and memory used?