Issue 2551379
Created on 2024-12-10 21:20 by rouilj, last changed 2024-12-10 21:20 by rouilj.
msg8226 |
Author: [hidden] (rouilj) |
Date: 2024-12-10 21:20 |
|
Currently dynamic pages have a cache header of no-cache (with some vary headers). This allows
caches to store the file, but should require revalidation on use. However
we don't set an etag or last-modified header (set from activity property of an item)
when serving the dynamic pages. So there is no way for the client to conditionally
validate a request. This means the server generates and serves up the entire page
every time.
There is a method for setting cache headers for static files:
https://rouilj.dynamic-dns.net/~rouilj/roundup_docs/docs/customizing.html#changing-cache-
control-headers
that allows the static file to be used from the cache without hitting the origin server.
Also last-modified and etag (somewhat see issue2551356) conditional requests are supported.
So a 304 response can be sent without shipping the entire file.
Supporting conditional requests for dynamic pages can eliminate html
generation and shipping bytes when the user does a normal refresh.
It seems we should be able to cache dynamic pages without hitting
the origin server by setting an appropriate lifetime.
If the issue is closed, or has not had any recent activity it seems safe to cache the
page client side. Especially if it is not in edit mode. However even in edit mode the
edit collision detection should prevent lost edits.
For example, from an index page, view an issue. This loads the issue from the server.
Using the back button does not reload the index page from the server (back-forward
cache I guess). But revisiting the same issue does cause a reload from the server.
It would be nice to not hit the server for the redisplay.
Currently, I think check/validating a no-cache page using conditional get still
requires pulling all of the data from the database and generating the html.
Perhaps etag caching (issue2551378) could help with this?? I am not sure about this since
using two different templates for the same item should have two different etags (an etag
is supposed to be unique per representation so...).
However using Last-Modified/if-modified-since for conditional get on an item would
seem to make sense.
|
|
Date |
User |
Action |
Args |
2024-12-10 21:20:10 | rouilj | create | |
|