@@ 247-262 (lines=16) @@ | ||
244 | * @throws \phpFastCache\Exceptions\phpFastCacheCoreException |
|
245 | * @throws \phpFastCache\Exceptions\phpFastCacheDriverException |
|
246 | */ |
|
247 | public function getStats() |
|
248 | { |
|
249 | $stat = new driverStatistic(); |
|
250 | $path = $this->getFilePath(false); |
|
251 | ||
252 | if (!is_dir($path)) { |
|
253 | throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); |
|
254 | } |
|
255 | ||
256 | $stat->setData(implode(', ', array_keys($this->itemInstances))) |
|
257 | ->setRawData([]) |
|
258 | ->setSize(Directory::dirSize($path)) |
|
259 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
260 | ||
261 | return $stat; |
|
262 | } |
|
263 | } |
@@ 452-467 (lines=16) @@ | ||
449 | * @return driverStatistic |
|
450 | * @throws PDOException |
|
451 | */ |
|
452 | public function getStats() |
|
453 | { |
|
454 | $stat = new driverStatistic(); |
|
455 | $path = $this->getFilePath(false); |
|
456 | ||
457 | if (!is_dir($path)) { |
|
458 | throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); |
|
459 | } |
|
460 | ||
461 | $stat->setData(implode(', ', array_keys($this->itemInstances))) |
|
462 | ->setRawData([]) |
|
463 | ->setSize(Directory::dirSize($path)) |
|
464 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
465 | ||
466 | return $stat; |
|
467 | } |
|
468 | ||
469 | /** |
|
470 | * @return array |