protected function FileCache::doGetStats in Plug 7
Retrieves cached information from the data store.
@since 2.2
Return value
array|null An associative array with server's statistics if available, NULL otherwise.
Overrides CacheProvider::doGetStats
File
- lib/
doctrine/ cache/ lib/ Doctrine/ Common/ Cache/ FileCache.php, line 143
Class
- FileCache
- Base file cache driver.
Namespace
Doctrine\Common\CacheCode
protected function doGetStats() {
$usage = 0;
foreach ($this
->getIterator() as $file) {
$usage += $file
->getSize();
}
$free = disk_free_space($this->directory);
return array(
Cache::STATS_HITS => null,
Cache::STATS_MISSES => null,
Cache::STATS_UPTIME => null,
Cache::STATS_MEMORY_USAGE => $usage,
Cache::STATS_MEMORY_AVAILABLE => $free,
);
}