mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 07:29:23 +00:00
Improve http caching in redbean
This commit is contained in:
parent
d0d9cd38c5
commit
2c7f865b12
1 changed files with 3 additions and 3 deletions
|
@ -2123,10 +2123,10 @@ static char *AppendCache(char *p, int64_t seconds) {
|
|||
if (seconds < 0) return p;
|
||||
p = stpcpy(p, "Cache-Control: max-age=");
|
||||
p = FormatUint64(p, seconds);
|
||||
if (seconds) {
|
||||
p = stpcpy(p, ", public");
|
||||
} else {
|
||||
if (!seconds) {
|
||||
p = stpcpy(p, ", no-store");
|
||||
} else {
|
||||
p = stpcpy(p, ", must-revalidate");
|
||||
}
|
||||
p = AppendCrlf(p);
|
||||
return AppendExpires(p, (int64_t)shared->nowish + seconds);
|
||||
|
|
Loading…
Add table
Reference in a new issue