Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for cacheKeyParameters per QueryStringParameter #59

Closed
gligorkot opened this issue Jun 4, 2019 · 3 comments
Closed

Support for cacheKeyParameters per QueryStringParameter #59

gligorkot opened this issue Jun 4, 2019 · 3 comments

Comments

@gligorkot
Copy link

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 the cacheKeyParameters property.

Thank you!

@DianaIonita
Copy link
Owner

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

@gligorkot
Copy link
Author

gligorkot commented Jun 5, 2019

@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.

@DianaIonita
Copy link
Owner

No worries - a bit hard to spot to be fair, cache key parameters probably need a section of their own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants