Miserlou/Zappa

API Gateway caching and query parameters

Open

#1.081 aberto em 4 de set. de 2017

Ver no GitHub
 (1 comment) (1 reaction) (0 assignees)Python (1.286 forks)batch import
hacktoberfesthelp wanted

Métricas do repositório

Stars
 (11.903 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

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?

Guia do colaborador