gin-contrib / cache

Gin middleware/handler to enable Cache
https://gin-gonic.github.io/gin
MIT License
364 stars 95 forks source link

does this support dynamic key for a route? #106

Open encryptblockr opened 3 months ago

encryptblockr commented 3 months ago

lets say we have an authenticated required api endpoint GET /userdata

that returns details about the authenticated user that calls it

user1 calls GET /userdata and wants response for user1 user2 calls GET /userdata and wants response for user2

does this middleware support the above?

how do we achieve this? because currently the cache just creates one single key for each route endpoint and that does not work and i would think others have the use-case i described above