Allan McRae <allan@archlinux.org> on Mon, 2022/09/26 22:35:
On 26/9/22 21:54, Christian Hesse wrote:
Allan McRae <allan@archlinux.org> on Mon, 2022/09/26 20:44:
On 19/9/22 22:52, Christian Hesse wrote:
From: Christian Hesse <mail@eworm.de>
By setting the HTTP header 'Cache-Control: no-cache' when returning with the status code 404 (not found) the server can indicate that this is a soft failure. No error message is shown, and server's error count is not increased.
This can be used by servers that are not expected to be complete, for example when serving a local cache [0]. In nginx this can be achived by adding a single directive in location block:
add_header Cache-Control "no-cache";
I am not accepting this patch. 1) "no-cache" to indicate this a cache of packages...
You missed the point. This does not tell not to cache packages. It does tell not to cache an error. ;)
Fun fact: Searching for the keywords yields a lot of matches for some well known cloud providers and their proxy software. Looks like the same is used there not to cache errors.
This is the sort of information that would make considering this as an option more likely. Can you expand on this with some examples?
Oh, did not expect that to decide the thing. Here is a selection of links on the topic... https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HTTPStatu... https://cloud.google.com/cdn/docs/using-negative-caching https://community.cloudflare.com/t/how-to-avoid-caching-404/196262 https://community.cloudflare.com/t/cache-everything-and-dont-cache-404-at-al... For Cloudflare I found the forum discussions only, not sure if the relevant parts have been removed from documentation... There must have been more. :) Default caching on 404 happens for something between several seconds and minutes by default. This can be changed to different time (CacheControl: age=...) or disabled (CacheControl: no-cache). -- main(a){char*c=/* Schoene Gruesse */"B?IJj;MEH" "CX:;",b;for(a/* Best regards my address: */=0;b=c[a++];) putchar(b-1/(/* Chris cc -ox -xc - && ./x */b/42*2-3)*42);}