/** * @return driverStatistic * @throws \phpFastCache\Exceptions\phpFastCacheIOException */ public function getStats() { $stat = new driverStatistic(); $path = $this->getFilePath(false); if (!is_dir($path)) { throw new phpFastCacheIOException("Can't read PATH:" . $path); } $stat->setData(implode(', ', array_keys($this->itemInstances)))->setRawData(['tmp' => $this->tmp])->setSize(Directory::dirSize($path))->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); return $stat; }
/** * @return driverStatistic */ public function getStats() { return (new driverStatistic())->setData(implode(', ', array_keys($this->itemInstances)))->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($this->getLeveldbFile()))->setSize(Directory::dirSize($this->getLeveldbFile())); }