@@ 411-426 (lines=16) @@ | ||
408 | * @return driverStatistic |
|
409 | * @throws PDOException |
|
410 | */ |
|
411 | public function getStats() |
|
412 | { |
|
413 | $stat = new driverStatistic(); |
|
414 | $path = $this->getFilePath(false); |
|
415 | ||
416 | if (!is_dir($path)) { |
|
417 | throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); |
|
418 | } |
|
419 | ||
420 | $stat->setData(implode(', ', array_keys($this->itemInstances))) |
|
421 | ->setRawData([]) |
|
422 | ->setSize(Directory::dirSize($path)) |
|
423 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
424 | ||
425 | return $stat; |
|
426 | } |
|
427 | ||
428 | /** |
|
429 | * @return array |
@@ 203-218 (lines=16) @@ | ||
200 | * @throws \phpFastCache\Exceptions\phpFastCacheCoreException |
|
201 | * @throws \phpFastCache\Exceptions\phpFastCacheDriverException |
|
202 | */ |
|
203 | public function getStats() |
|
204 | { |
|
205 | $stat = new driverStatistic(); |
|
206 | $path = $this->getFilePath(false); |
|
207 | ||
208 | if (!is_dir($path)) { |
|
209 | throw new phpFastCacheDriverException("Can't read PATH:" . $path, 94); |
|
210 | } |
|
211 | ||
212 | $stat->setData(implode(', ', array_keys($this->itemInstances))) |
|
213 | ->setRawData([]) |
|
214 | ->setSize(Directory::dirSize($path)) |
|
215 | ->setInfo('Number of files used to build the cache: ' . Directory::getFileCount($path)); |
|
216 | ||
217 | return $stat; |
|
218 | } |
|
219 | } |