Miserlou/Zappa

API Gateway caching and query parameters

Open

#1081 aperta il 4 set 2017

Vedi su GitHub
 (1 commento) (1 reazione) (0 assegnatari)Python (1286 fork)batch import
hacktoberfesthelp wanted

Metriche repository

Star
 (11.903 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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?

Guida contributor