Skip to content

Commit 608051b

Browse files
Update internal/responsecache/responsecache.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 54eae2e commit 608051b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

internal/responsecache/responsecache.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,14 @@ func (m *ResponseCacheMiddleware) HandleRequest(c *echo.Context, body []byte, ne
9595
return next()
9696
}
9797

98+
import (
99+
"log/slog"
100+
"strings"
101+
"time"
102+
)
103+
98104
skipExact := ShouldSkipExactCache(c.Request())
99-
skipSemantic := m.semantic == nil || c.Request().Header.Get("X-Cache-Type") == CacheTypeExact
105+
skipSemantic := m.semantic == nil || strings.EqualFold(c.Request().Header.Get("X-Cache-Type"), CacheTypeExact)
100106

101107
if !skipExact && m.simple != nil {
102108
hit, err := m.simple.TryHit(c, body)

0 commit comments

Comments
 (0)