Skip to content

Commit b189b30

Browse files
authored
Merge pull request #15 from kenshin579/feat/#14-expired
[#14] every time it keeps caching every response
2 parents 491aba9 + ea164cb commit b189b30

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)