Skip to content

Commit 911f353

Browse files
feat(demo): Restore /api/stats endpoint
1 parent f36b7b8 commit 911f353

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

public/index.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,14 @@ public function log($level, $message, array $context = []) : void
255255
}
256256
}
257257

258+
// API: Stats endpoint
259+
if ('/api/stats' === $path) {
260+
return Response::json([
261+
'hits' => $tracker->hits,
262+
'misses' => $tracker->misses
263+
]);
264+
}
265+
258266
// API: Clear all caches
259267
if ('/api/clear' === $path) {
260268
MemoryAdapter::$data = [];

0 commit comments

Comments
 (0)