Skip to content

Commit e64925f

Browse files
committed
Updated Wincache Info driver
1 parent ea3345f commit e64925f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/phpFastCache/Drivers/Wincache/Driver.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,14 @@ protected function driverConnect()
127127
*/
128128
public function getStats()
129129
{
130+
$memInfo = wincache_ucache_meminfo();
131+
$info = wincache_ucache_info();
132+
$date = (new \DateTime())->setTimestamp(time() - $info['total_cache_uptime']);
133+
130134
return (new driverStatistic())
131-
->setInfo('There is currently no info available for this driver :/')
132-
->setSize(0)
135+
->setInfo(sprintf("The Wincache daemon is up since %s.\n For more information see RawData.", $date->format(DATE_RFC2822)))
136+
->setSize($memInfo['memory_free'] - $memInfo['memory_total'])
133137
->setData(implode(', ', array_keys($this->itemInstances)))
134-
->setRawData(wincache_scache_info());
138+
->setRawData($memInfo);
135139
}
136140
}

0 commit comments

Comments
 (0)