-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Description
When AMP_Style_Sanitizer::fetch_external_stylesheet() fails to fetch an external stylesheet, it caches the a WP_Error in the transient as opposed to the stylesheet string. In both cases, the transient expires after a month. This should be more dynamic, namely:
- Fetches that result in failures should be cached for a
DAY_IN_SECONDSrather thanMONTH_IN_SECONDS. - Fetches that are successful should actually use a transient expiration that reflects the
Cache-Controlresponse header, as long as themax-ageis greater than some minimum amount (e.g. 1 day).
See also this todo:
| * @todo Use Cache-Control max-age for transient. |
Originally referenced in in #2449 (comment).
Reactions are currently unavailable