This repository was archived by the owner on Apr 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 361
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
LoadFromFileCacheTtlMs is not honored (*after* first request) #1418
Copy link
Copy link
Closed
Description
When LoadFromFile is set with a custom LoadFromFileCacheTtlMs, the first request wil honor the LoadFromFileCacheTtlMs, but after the first request, it wil default back to max-age: 300 (5 minutes), as per the non-public psol code.
Example:
inside the server config:
pagespeed LoadFromFile "http://example.com" "/var/www"
pagespeed LoadFromFileCacheTtlMs 31556926000;
First request
Request URL:
https://example.com/test.js?1
Response headers:
HTTP/1.1 200 OK
Server: nginx/1.10.0 (Ubuntu)
Content-Type: application/javascript
Transfer-Encoding: chunked
Connection: keep-alive
Date: Tue, 16 May 2017 17:31:57 GMT
Expires: Wed, 16 May 2018 23:20:43 GMT
Last-Modified: Tue, 17 Jan 2017 14:01:55 GMT
Cache-Control: max-age=31556926, s-maxage=10
Second request
Request URL:
https://example.com/test.js?1
Response headers:
Server: nginx/1.10.0 (Ubuntu)
Content-Type: application/javascript
Connection: keep-alive
X-Original-Content-Length: 32197
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 8806
ETag: W/"PSA-aj-CiswHsWsJj"
Date: Tue, 16 May 2017 17:32:53 GMT
Expires: Tue, 16 May 2017 17:37:53 GMT
Cache-Control: max-age=300
Third request
Request URL:
https://example.com/test.js?2
Response headers:
Server: nginx/1.10.0 (Ubuntu)
Content-Type: application/javascript
Transfer-Encoding: chunked
Connection: keep-alive
Date: Tue, 16 May 2017 17:34:15 GMT
Expires: Wed, 16 May 2018 23:23:01 GMT
Last-Modified: Tue, 17 Jan 2017 14:01:55 GMT
Cache-Control: max-age=31556926, s-maxage=10
Fourth request
Request URL:
https://example.com/test.js?2
Response headers:
Server: nginx/1.10.0 (Ubuntu)
Content-Type: application/javascript
Connection: keep-alive
X-Original-Content-Length: 32197
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 8806
ETag: W/"PSA-aj-CiswHsWsJj"
Date: Tue, 16 May 2017 17:35:03 GMT
Expires: Tue, 16 May 2017 17:40:03 GMT
Cache-Control: max-age=300
The even results are repeated for every request after this, with the exact same URL, maintaining the (PSOL/default) 300 seconds.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels