We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 491aba9 + ea164cb commit b189b30Copy full SHA for b189b30
cache.go
@@ -160,7 +160,7 @@ func CacheWithConfig(config CacheConfig) echo.MiddlewareFunc {
160
if cachedResponse, ok := config.Store.Get(key); ok {
161
response := toCacheResponse(cachedResponse)
162
now := time.Now()
163
- if response.Expiration.After(now) {
+ if now.After(response.Expiration) {
164
response.LastAccess = now
165
response.Frequency++
166
config.Store.Set(key, response.bytes(), response.Expiration)
0 commit comments