| author | 2026-05-16 14:01:14 +0700 | |
|---|---|---|
| committer | 2026-05-16 14:01:14 +0700 | |
| commit | ed476a1f0d3f970f977626688ac316f8b251d3a0 (patch) | |
| tree | 8c63d6d01adff1ba0ac510d860753a6a64bf7998 /internal/router/router.go | |
| parent | 44b72cbc80fb89788470bda75eeb9c0bb3dee2f5 (diff) | |
| download | web-ed476a1f0d3f970f977626688ac316f8b251d3a0.tar.gz web-ed476a1f0d3f970f977626688ac316f8b251d3a0.zip | |
feat: highlight the blog page visited earlier in blog catalogue
Diffstat (limited to 'internal/router/router.go')
| -rw-r--r-- | internal/router/router.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/router/router.go b/internal/router/router.go index 7f3511a..a1208e0 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -576,11 +576,12 @@ func (r *Router) generalPageSegment(c *fiber.Ctx, part string) error { cacheKey := "" trimmedPath := strings.Trim(path, "/") + requestQuery := string(c.Request().URI().QueryString()) switch route.ToCache() { case ByUrlOnly: cacheKey = fmt.Sprintf("%s.%s.%s", method, part, trimmedPath) case ByUrlAndQuery: - cacheKey = fmt.Sprintf("%s.%s.%s.%s", method, part, trimmedPath, queryString) + cacheKey = fmt.Sprintf("%s.%s.%s.%s.%s", method, part, trimmedPath, queryString, requestQuery) } if route.ToCache() != Disabled { |