Miserlou/Zappa

API Gateway caching and query parameters

Open

#1 081 ouverte le 4 sept. 2017

Voir sur GitHub
 (1 commentaire) (1 réaction) (0 assignés)Python (1 286 forks)batch import
hacktoberfesthelp wanted

Métriques du dépôt

Stars
 (11 903 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

I'm currently trying to configure the caching on API Gateway side to reduce the load of my database. The endpoint I'm trying to configure is using a query parameter to pass-in the term the user typed into the search bar. I already enabled caching on APG side but unfortunately had to find out that by default it's ignoring the query parameters when building the cache key. While I don't really get why that is sensible default behavior to AWS I was wondering what would be the best way to configure it properly using Zappa. I already found one example for serverless (http://theburningmonk.com/2016/04/serverless-enable-caching-on-query-string-parameters-in-api-gateway/) but am wondering what I need to put for CacheKeyParameters into my CF template?

Any ideas?

Guide contributeur