Closed gligorkot closed 5 years ago
Thanks @gligorkot!
You should already be able to specify query string parameters as cache keys, like this:
# Responses are cached based on the 'breed' query string parameter
get-cats-by-breed:
handler: rest_api/cat/get/handler.handle
events:
- http:
path: /cats
method: get
caching:
enabled: true
cacheKeyParameters:
- name: request.querystring.breed
@DianaIonita oh cool! I tried query
and querystringparameter
, but not just querystring
hehehe.
Perhaps adding this to the Readme would help then?
Edit: I just saw it in the Readme 🤦♂ how could I have missed that???
Thanks for pointing me to it.
No worries - a bit hard to spot to be fair, cache key parameters probably need a section of their own.
Love this plugin! It is super valuable and very quick to set up.
One thing that would be great to add is support for
queryStringParameters
in thecacheKeyParameters
property.Thank you!