Disable the cloudflare's cache in the prestashop admin

I’ve set a rule to disable the Cloudflare’s cache for the admin of prestashop, but it doesn’t work.
from a module I generate a csv file, but I download the same file for everything even if I change some settings and the file has a different size.
in fact if I clean the cache from the Cloudflare’s panel, I can download the right file, but I need to clean the cache each time.

security disabled
cache bypass
app disabled
performance disabled

the rule doesn’t work, and it is not possible to work in the admin panel with this cache activated

can you help me to disable it?


Which particular URLs in the backend are still getting served as a HIT?
Also make sure after setting up that pagerule to wipe the cache.

yes I have cleaned the cache from Cloudflare’s panel some times.

I’ve associated to a button a link to download a csv file
the link is this one


this topic has the same problem

If I purge the cache from Cloudflare’s panel, I can see the right file, but I cannot purge it at each time that I create a new file from the form

I use a solution like this. The same problem using download=“‘.time().’.csv”

now I tried adding this code

        header('Cache-Control: no-store, private, no-cache, must-revalidate');     // HTTP/1.1
        header('Cache-Control: pre-check=0, post-check=0, max-age=0, max-stale = 0', false);  // HTTP/1.1
        header('Pragma: public');
        header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');                  // Date in the past  
        header('Expires: 0', false); 
        header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
        header ('Pragma: no-cache');

but it is not possible to bypass the Cloudflare’s cache

is it possible to disable the cache of some file types such as .csv?

This URL is not getting matched by this rule www.todoparatucoche.com/lubricantes-online/adminvictor/*

So there are multiple ways to solve that:

  1. modify the rule/add a rule that matches it.
  2. modify the webserver config (.htaccess or nginx.conf) on your server to set headers which make this particular file uncachable for Cloudflare.

in the rule is it necessary to set so?


I’have fixed adding https://

but in the Cloudflare’s doc it is written to set *… at the begin

thanks for your support

Please check if the rule matches the URLs you want to match. The https:// was not nessecary but if you use HTTPS only it doesnt matter. Without the scheme itt matches both, HTTP and HTTPS.

I gave you two ways to fix it, choose one of them:

with this work

if I remove https:// you said me that the rule doesn’t match the url but at the start I’ve set

sorry but now this solution doesn’t work anymore
I did some new tests and now I download the same file even if the real file is different
the page rules don’t work

can you report these problems to the Cloudflare’s support to fix them?

I solve this problem with htaccess solution using this code

<FilesMatch "\.(pdf|csv|doc)$"> <IfModule mod_expires.c> ExpiresActive Off </IfModule> <IfModule mod_headers.c> FileETag None Header unset ETag Header unset Pragma Header unset Cache-Control Header unset Last-Modified Header set Pragma "no-cache" Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Expires "Mon, 10 Apr 1972 00:00:00 GMT" </IfModule> </FilesMatch>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.