kotti.views.cache

kotti.views.cache.set_max_age(response, delta, cache_ctrl=None)[source]

Sets max-age and expires headers based on the timedelta delta.

If cache_ctrl is not None, I’ll add items found therein to the Cache-Control header.

Will overwrite existing values and preserve non overwritten ones.

kotti.views.cache.includeme(config)[source]

Pyramid includeme hook.

Parameters:config (pyramid.config.Configurator) – app config