Hi there! So we tried CF caching and implemented page rules and also script in Nginx server.
The page rule was this:
“exmple.com
Auto Minify: HTML, CSS & JS, Browser Cache TTL: a month, Cache Level: Cache Everything, Edge Cache TTL: a month”
The server side script was:
“location /robots.txt { add_header Cache-Control “no-cache, no-store, must-revalidate, max-age=0”; expires -1; }
location ~* .(css|js)$ {
add_header Cache-Control “public, max-age=2592000, must-revalidate”; expires 60d; }
location ~* .(jpg|ico|jpe g|png|gif|svg|webp|woff|woff2)$ {
add_header Cache-Control “public, max-age=31536000, must-revalidate”; expires 365d; }
location / { add_header Cache-Control “public, max-age=1296000, must-revalidate”;}”
Result was - all the assets were being cached normally but there was issue with HTML, we saw the caching report and it showed most of the time “Dynamic” and only about 3-4% Hit. If we were to open the page it showed us HIT but the caching percentage was max 30% and HTML was not caching. We had to revert it because Google crawler response time was increasing and indexing was going down. Also I noticed a parameter “Pragma” which always said “no-cache” despite cache-status : Hit. Any help?