@@ 228-243 (lines=16) @@ | ||
225 | * @throws \phpFastCache\Exceptions\phpFastCacheCoreException |
|
226 | * @throws \phpFastCache\Exceptions\phpFastCacheDriverException |
|
227 | */ |
|
228 | public function getStats() |
|
229 | { |
|
230 | $stat = new driverStatistic(); |
|
231 | $path = $this->getFilePath(false); |
|
232 | ||
233 | if (!is_dir($path)) { |
|
234 | throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); |
|
235 | } |
|
236 | ||
237 | $stat->setData(implode(', ', array_keys($this->itemInstances))) |
|
238 | ->setRawData([]) |
|
239 | ->setSize(Directory::dirSize($path)) |
|
240 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
241 | ||
242 | return $stat; |
|
243 | } |
|
244 | } |
@@ 421-436 (lines=16) @@ | ||
418 | * @return driverStatistic |
|
419 | * @throws PDOException |
|
420 | */ |
|
421 | public function getStats() |
|
422 | { |
|
423 | $stat = new driverStatistic(); |
|
424 | $path = $this->getFilePath(false); |
|
425 | ||
426 | if (!is_dir($path)) { |
|
427 | throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); |
|
428 | } |
|
429 | ||
430 | $stat->setData(implode(', ', array_keys($this->itemInstances))) |
|
431 | ->setRawData([]) |
|
432 | ->setSize(Directory::dirSize($path)) |
|
433 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
434 | ||
435 | return $stat; |
|
436 | } |
|
437 | ||
438 | /** |
|
439 | * @return array |