@@ -315,12 +315,12 @@ public function enableCacheUpdate() {
315315 $ this ->updaterEnabled = true ;
316316 }
317317
318- protected function writeUpdate (Storage $ storage , $ internalPath , $ time = null ) {
318+ protected function writeUpdate (Storage $ storage , $ internalPath , $ time = null , $ size = null ) {
319319 if ($ this ->updaterEnabled ) {
320320 if (is_null ($ time )) {
321321 $ time = time ();
322322 }
323- $ storage ->getUpdater ()->update ($ internalPath , $ time );
323+ $ storage ->getUpdater ()->update ($ internalPath , $ time, $ size );
324324 }
325325 }
326326
@@ -1183,7 +1183,9 @@ private function basicOperation($operation, $path, $hooks = [], $extraParam = nu
11831183 $ this ->removeUpdate ($ storage , $ internalPath );
11841184 }
11851185 if ($ result && in_array ('write ' , $ hooks , true ) && $ operation !== 'fopen ' && $ operation !== 'touch ' ) {
1186- $ this ->writeUpdate ($ storage , $ internalPath );
1186+ $ size = $ operation === 'mkdir ' ? 0 : null ;
1187+ $ size = $ operation === 'file_put_contents ' ? $ result : $ size ;
1188+ $ this ->writeUpdate ($ storage , $ internalPath , null , $ size );
11871189 }
11881190 if ($ result && in_array ('touch ' , $ hooks )) {
11891191 $ this ->writeUpdate ($ storage , $ internalPath , $ extraParam );
0 commit comments