FEAT: Cache TTL for app.page decorator
Open
python
- Dominant language
- Python
- Stars
- 917
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature**
In a lot of cases the content for `app.page` is static enough that we should provide a cache option for it. For example, a landing page may get updated never, or once per hour. Being able to specify the length of the cache in seconds would be really useful and allow easy performance boosts for a site. It would be good to have this API as a feature:
```python
import air
app = air.Air()
@app.page(cache_ttl=3600) # 1 hour cache
def index():
return air.layouts.mvpcss(
air.H1('Welcome!'),
... # Large page structure here
)
```
Contributor guide
Assessment
This issue has not been assessed yet.