File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
phpfastcache/3.0.0/drivers Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ function driver_stats($option = array()) {
143
143
144
144
$ total = 0 ;
145
145
$ removed = 0 ;
146
+ $ content = array ();
146
147
while ($ file =@readdir ($ dir )) {
147
148
if ($ file !=". " && $ file !=".. " && is_dir ($ path ."/ " .$ file )) {
148
149
// read sub dir
@@ -156,6 +157,14 @@ function driver_stats($option = array()) {
156
157
$ file_path = $ path ."/ " .$ file ."/ " .$ f ;
157
158
$ size = @filesize ($ file_path );
158
159
$ 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 " ]);
159
168
if ($ this ->isExpired ($ object )) {
160
169
@unlink ($ file_path );
161
170
$ removed += $ size ;
@@ -172,6 +181,7 @@ function driver_stats($option = array()) {
172
181
"Expired and removed [bytes] " => $ removed ,
173
182
"Current [bytes] " => $ res ['size ' ],
174
183
);
184
+ $ res ["data " ] = $ content ;
175
185
return $ res ;
176
186
}
177
187
You can’t perform that action at this time.
0 commit comments