Caching and conditional headers #16

Open
opened 2024-04-13 13:28:56 +02:00 by Jef Roosens · 0 comments

Caching can greatly reduce bandwidth and would be very useful to support from within the framework.

To support this globally, my current idea would be to allow the user to set the "last modified" date for a response body. This information could then be used to support the If-Modified-Since and If-Unmodified-Since headers.

ETags would be less trivial to support generally, as the ETag values depend on the specific content. For this, we could allow the user to set the ETag value for a response body explicitely, and only handle ETag headers if the value is present. The application itself would then be responsible for creating and storing ETag values, for example by hashing the contents.

Caching can greatly reduce bandwidth and would be very useful to support from within the framework. To support this globally, my current idea would be to allow the user to set the "last modified" date for a response body. This information could then be used to support the `If-Modified-Since` and `If-Unmodified-Since` headers. ETags would be less trivial to support generally, as the ETag values depend on the specific content. For this, we could allow the user to set the ETag value for a response body explicitely, and only handle ETag headers if the value is present. The application itself would then be responsible for creating and storing ETag values, for example by hashing the contents.
Jef Roosens added the
enhancement
label 2024-04-13 13:28:56 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Chewing_Bever/lnm#16
There is no content yet.