File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/phpFastCache/Drivers/Wincache Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments