File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed
Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 22 "strategy" : " semver" ,
33 "major" : 0 ,
44 "minor" : 6 ,
5- "patch" : 35 ,
5+ "patch" : 36 ,
66 "build" : 0
77}
Original file line number Diff line number Diff line change 11<?php
22namespace Neuron \Mvc \Cache \Storage ;
33
4+ use Neuron \Log \Log ;
45use Neuron \Mvc \Cache \Exceptions \CacheException ;
56
67class FileCacheStorage implements ICacheStorage
@@ -29,6 +30,7 @@ public function read( string $Key ): ?string
2930 {
3031 if ( $ this ->isExpired ( $ Key ) )
3132 {
33+ Log::debug ( "Cache entry expired for key: $ Key " );
3234 $ this ->delete ( $ Key );
3335 return null ;
3436 }
Original file line number Diff line number Diff line change 11<?php
22namespace Neuron \Mvc \Cache ;
33
4+ use Neuron \Log \Log ;
45use Neuron \Mvc \Cache \Exceptions \CacheException ;
56use Neuron \Mvc \Cache \Storage \ICacheStorage ;
67
@@ -40,7 +41,17 @@ public function get( string $Key ): ?string
4041 return null ;
4142 }
4243
43- return $ this ->_Storage ->read ( $ Key );
44+ $ Data = $ this ->_Storage ->read ( $ Key );
45+
46+ if ( !$ Data )
47+ {
48+ Log::debug ( "Cache miss for key: $ Key " );
49+ return null ;
50+ }
51+
52+ Log::debug ( "Cache hit for key: $ Key " );
53+
54+ return $ Data ;
4455 }
4556
4657 /**
@@ -205,4 +216,4 @@ private function shouldRunGc(): bool
205216 // Roll the dice
206217 return mt_rand ( 1 , $ Divisor ) <= ( $ Probability * $ Divisor );
207218 }
208- }
219+ }
Original file line number Diff line number Diff line change 1+ ## 0.6.36 2025-08-05
2+
3+ * Added cache debug logging.
4+
15## 0.6.35 2025-08-04
26
37* Added garbage collection for view file cache.
You can’t perform that action at this time.
0 commit comments