Skip to content

Commit d746949

Browse files
committed
Merge pull request #151 from khoaofgod/revert-150-final
Revert " Improved stats function for files driver"
2 parents cccc2c8 + bea5e4a commit d746949

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

phpfastcache/3.0.0/drivers/files.php

-10
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ function driver_stats($option = array()) {
143143

144144
$total = 0;
145145
$removed = 0;
146-
$content = array();
147146
while($file=@readdir($dir)) {
148147
if($file!="." && $file!=".." && is_dir($path."/".$file)) {
149148
// read sub dir
@@ -157,14 +156,6 @@ function driver_stats($option = array()) {
157156
$file_path = $path."/".$file."/".$f;
158157
$size = @filesize($file_path);
159158
$object = $this->decode($this->readfile($file_path));
160-
161-
if(strpos($f,".") === false) {
162-
$key = $f;
163-
}
164-
else {
165-
$key = explode(".", $f)[0];
166-
}
167-
$content[$key] = array("size"=>$size,"write_time"=>$object["write_time"]);
168159
if($this->isExpired($object)) {
169160
@unlink($file_path);
170161
$removed += $size;
@@ -181,7 +172,6 @@ function driver_stats($option = array()) {
181172
"Expired and removed [bytes]" => $removed,
182173
"Current [bytes]" => $res['size'],
183174
);
184-
$res["data"] = $content;
185175
return $res;
186176
}
187177

0 commit comments

Comments
 (0)