Miserlou/Zappa

Add `cache_routes` setting // Automatic CloudFront Cache Creation

Open

#727 aberto em 20 de mar. de 2017

Ver no GitHub
 (8 comments) (1 reaction) (0 assignees)Python (1.286 forks)batch import
enhancementhelp wanted

Métricas do repositório

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

Description

It'd be great if we could automatically create CloudFront distributions for certain, pre-defined routes. For instance, if you have a non-dynamic landing page and blog, but you have a dynamic dashboard, you could define something like:

"cache_routes": [
    '/', 
    '/accounts/login/', 
    '/blog/*'
]

and then the homepage and the blog will load much faster as it won't have to wake up Django.

Brian has defined steps on how to do this manually here: https://jinwright.net/how-deploy-serverless-wsgi-app-using-zappa/ - I'm just proposing that we can do some of this automatically.

Thoughts?

Guia do colaborador