()
| 106 | } |
| 107 | |
| 108 | function getCacheHitRate() { |
| 109 | const total = metrics.cacheHits + metrics.cacheMisses |
| 110 | return total === 0 ? 0 : ((metrics.cacheHits / total) * 100).toFixed(2) |
| 111 | } |
| 112 | |
| 113 | // ============================================================================ |
| 114 | // Express Middleware |