http_caching

Handles HTTP caching.

gratipay.utils.http_caching.try_to_serve_304(dispatch_result, request, etag)[source]

Try to serve a 304 for static resources.

gratipay.utils.http_caching.add_caching_to_response(response, request=None, etag=None)[source]

Set caching headers.