Skip to content

Commit ea164cb

Browse files
committed
[#14] expired check logic is incorrect
1 parent 491aba9 commit ea164cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func CacheWithConfig(config CacheConfig) echo.MiddlewareFunc {
160160
if cachedResponse, ok := config.Store.Get(key); ok {
161161
response := toCacheResponse(cachedResponse)
162162
now := time.Now()
163-
if response.Expiration.After(now) {
163+
if now.After(response.Expiration) {
164164
response.LastAccess = now
165165
response.Frequency++
166166
config.Store.Set(key, response.bytes(), response.Expiration)

0 commit comments

Comments
 (0)