CF-Cache -Status: Miss. Cache-control: no-cache

Hi, I am new to Cloudflare. Yesterday I activated my domain in Cloudflare, and I could see my domain is now active on Cloudflare.

I can not cache the files in Cloudflare, none that is under my domain.
https://cf-cache-status.net/?url=https%3A%2F%2Ftest-cytognos.com%2Fassets%2Fjs%2Futil.js#

I tried several times, unfortunately, it always showed cf-cache-status: MISS.

curl -k -svo /dev/null --header “Host:www.test-cytognos.com” https://www.test-cytognos.com/assets/js/util.js

GET /assets/js/util.js HTTP/2
Host:www.test-cytognos.com
User-Agent: curl/7.61.0
Accept: /
< date: Tue, 21 May 2019 11:49:21 GMT
< content-type: application/javascript
< set-cookie: __cfduid=d93527b055b7ccd46d132f1ede9a4694e1558439361; expires=Wed, 20-May-20 11:49:21 GMT; path=/; domain=.test-cytognos.com; HttpOnly
< cache-control: no-cache
< expires: Tue, 21 May 2019 11:49:20 GMT
< etag: W/“2e47-5ce3dc0b-1fa66d269f6a3d10;gz”
< last-modified: Tue, 21 May 2019 11:07:55 GMT
< vary: Accept-Encoding
< x-powered-by: PleskLin
< x-turbo-charged-by: LiteSpeed
< cf-cache-status: MISS
< expect-ct: max-age=604800, report-uri=“https://report-uri.Cloudflare.com/cdn-cgi/beacon/expect-ct
< server: Cloudflare
< cf-ray: 4da65397ac49cd8f-CDG

Can you help me?
Thanks,

This header is coming from your website/web server itself. You need to make sure your server sends the correct header (in this case cache-control: public, max-age=<number of seconds>).

If you’re having trouble, you can also try a page with with the “edge cache TTL” setting, just be careful as any dynamic content covered by the page rule will start also being cached.

Thanks Judge.

And what is wrong with the server? I understand that the server is sending that header and therefore Cloudflare detects it and does not save any files.

I do not know if I will have problems in the configuration of Apache, Ngix, PHP …

Thank you.

If you’re using Apache it’s probably in .htaccess, if it’s not there it may be hard to track down where that header is being set. You may also find success in asking your host.

In my root folder I do not have any .htaccess file. Can it be somewhere else?

Can you put an htaccess file in the root and that it is a priority over any other configuration?

Thank you.

That is a question for your host, they may have it set up to disallow .htaccess or they may not use apache at all (Apache is the only software that uses htaccess). You should contact them.

My hosting company has provided me with this htaccess and I have inserted it in the root of my site.
For now I’m still not having my files cached.
What could be happening?

https://cf-cache-status.net/?url=https%3A%2F%2Ftest-cytognos.com%2Fassets%2Fjs%2Futil.js#

<FilesMatch "\.(php|html|htm|txt|html5|jpg|png|js|css)$">
Header set Cache-Control "max-age=604800"
Header set last-modified "Tus May 15 13:00:00 EDT 2012"
</FilesMatch>

#Deshabilitar parametros siguientes

<FilesMatch "\.(pl|cgi|spl|html)$">
    Header unset Cache-Control
    Header unset Expires
    Header unset Last-Modified
    FileETag None
    Header unset ETag
    Header unset Pragma
</FilesMatch>

Thanks!

This topic was automatically closed after 31 days. New replies are no longer allowed.