Specify a cache validator, how to set it?
-
Hi there,
trying your free CDN service for my wordpress site.
when testing it using GTMetrix, I got this optimization recommendation
Specify a cache validator
The following resources are missing a cache validator. Resources that do not specify a cache validator cannot be refreshed efficiently. Specify a Last-Modified or ETag header to enable cache validation for the following resources:
is it related to your cdn configuration or my side?
-
I have to double check our system but I think that might be a header thats set and sent by the origin server (your server). Can you check to see if that header is being set on non-cached files from your server perhaps?
I’ll do some research on our side and make sure its not something we can accommodate as well.
i am sorry, it seems my hosting doesn’t return expires header. i have reconfigure it on now, it has expire header
curl -I https://griyaannisawedding.com/wp-content/uploads/2019/01/prosesi-akad-nikah-mba-detik.jpeg
HTTP/2 200
content-type: image/jpeg
content-length: 260851
vary: Accept-Encoding
server: LEMPer
pragma: public
accept-ranges: bytes
x-original-content-length: 331596
etag: W/”PSA-aj-Tp_ACs2rgU”
date: Mon, 23 Sep 2019 16:55:20 GMT
expires: Tue, 22 Oct 2019 10:21:25 GMT
vary: User-Agent,Save-Data
cache-control: max-age=2481964, publicbtw, how to flush cdn content so it has newest one or it will done automatically?
thanks in advance
Update:
From YSlow check, getting this issue: “static components without a far-future expiration date.”
it seems my stored CDN file expire header set to 5 days for image media and 1 day for (JS & CSS) file.
$ curl -I https://1qs9tm3fg0bzi.wpcdn.shift8cdn.com/wp-content/uploads/2018/12/xwedding-sovia-barry.jpg.pagespeed.ic.ehoQbrtt3N.webp HTTP/1.1 200 OK Server: nginx/1.16.0 Date: Tue, 24 Sep 2019 10:01:06 GMT Content-Type: image/webp Content-Length: 105792 Connection: keep-alive Vary: Accept-Encoding Pragma: public Expires: Sun, 29 Sep 2019 10:01:06 GMT ETag: W/"0" Last-Modified: Tue, 24 Sep 2019 09:16:06 GMT Cache-Control: max-age=432000 X-Original-Content-Length: 159049 X-Page-Speed: LEMPer/PageSpeed X-Shift8CDN-Cache: HIT Pragma: public Cache-Control: public Access-Control-Allow-Origin: https://griyaannisawedding.com Accept-Ranges: bytes$ curl -I https://1qs9tm3fg0bzi.wpcdn.shift8cdn.com/wp-content/plugins/wpforms-lite/assets/css/A.wpforms-full.css.pagespeed.cf.YA2pSbySp5.css HTTP/1.1 200 OK Server: nginx/1.16.0 Date: Tue, 24 Sep 2019 10:06:13 GMT Content-Type: text/css Content-Length: 29726 Connection: keep-alive Vary: Accept-Encoding Pragma: public Expires: Wed, 25 Sep 2019 10:06:13 GMT ETag: W/"0" Last-Modified: Tue, 24 Sep 2019 09:22:09 GMT Cache-Control: max-age=86400 X-Original-Content-Length: 35341 Vary: Accept-Encoding X-Page-Speed: LEMPer/PageSpeed X-Shift8CDN-Cache: HIT Pragma: public Cache-Control: public Access-Control-Allow-Origin: https://griyaannisawedding.com Accept-Ranges: byteswhile the original file (on my server) the expiration set to 1 year
$ curl -I https://griyaannisawedding.com/wp-content/uploads/2018/12/xwedding-sovia-barry.jpg.pagespeed.ic.ehoQbrtt3N.webp HTTP/2 200 content-type: image/webp content-length: 105792 server: LEMPer pragma: public accept-ranges: bytes date: Tue, 24 Sep 2019 09:16:06 GMT expires: Wed, 23 Sep 2020 09:16:06 GMT etag: W/"0" last-modified: Tue, 24 Sep 2019 09:16:06 GMT cache-control: max-age=31536000, public x-original-content-length: 159049 x-page-speed: LEMPer/PageSpeed$ curl -I https://griyaannisawedding.com/wp-content/plugins/wpforms-lite/assets/css/A.wpforms-full.css.pagespeed.cf.YA2pSbySp5.css HTTP/2 200 content-type: text/css server: LEMPer pragma: public accept-ranges: bytes date: Tue, 24 Sep 2019 09:22:09 GMT expires: Wed, 23 Sep 2020 09:22:09 GMT etag: W/"0" last-modified: Tue, 24 Sep 2019 09:22:09 GMT cache-control: max-age=31536000, public x-original-content-length: 35341 vary: Accept-Encoding content-length: 29726 x-page-speed: LEMPer/PageSpeedis there any option to set the expiration time?
-
This reply was modified 6 years, 8 months ago by
Jan Dembowski.
-
This reply was modified 6 years, 8 months ago by
Jan Dembowski. Reason: Formatting
@masedinet The forums are for supporting the code for the plugin only. For questions regarding the CDN you need to discuss that on their site.
For pro or commercial product support please contact the author directly on their site. This includes any pre-sales topics as well and any topic about a service.
As the author is aware, commercial products are not supported in these forums. I am sure they will have no problem supporting you there.
@shift8 Provide a link for that and I will close this topic.
Hello,
Though there is no pro or commercial version of this product (it is 100% free), you can send an email to [email protected] and I can assist you further there. The issues described in this forum post are specifically how the free plugin’s infrastructure is potentially settings or processing headers relating to caching.
Thanks!
This is a plugin that integrates a 100% free CDN service operated by Shift8
Only the code can be supported here only and that it’s a free service is irrelevant. Any questions about the free service need to be taken elsewhere.
-
This reply was modified 6 years, 8 months ago by
The topic ‘Specify a cache validator, how to set it?’ is closed to new replies.