-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 Get unexpected results from cache #1529
Labels
Comments
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
}, this works well,but don't know why |
in the example you use the memory as storage for the cache, there the path from the context is used directly, because we have a reference here to save allocations in the next request, this memory area is linked and the cache key changes as you rightly noticed, we should make a copy of the string, this will slow down the middleware a bit, but should be ok |
ReneWerner87
added a commit
that referenced
this issue
Sep 15, 2021
ok,thank you |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fiber version
github.com/gofiber/fiber/v2 v2.18.0
Issue description
Get unexpected results from cache
Code snippet
The text was updated successfully, but these errors were encountered: