exclude a specific php file for caching




Wordpress LScache Plugin: exclude a specific php file for caching

Last Updated on: Wed, 15 Apr 2026 00:00:02
I have a PHP file where located in /wp-content/themes/theme_name/downloadbox.php I want to exclude it for caching how can I do it? Hi, but you may want to exclude the actual front-end request URI instead of file name Best regards, @CacheCrawler Actually in some pages we have a section tag. It is displayed when a if condition returns true. Condition is about users country. For example if users country is U.S.A, the tag will be displayed. The problem is sometime the pages became cache. So the if condition does not work. I want to found out a way to stop caching the php file which the if function located there. Hi, So you actually want to vary the cache based on users location/country ,instead of disabling cache ? Best regards, @CacheCrawler Hi Actually, both way can be useful. each one has some advantages for my situation. especially if I can disable cache for the PHP file( the function that displays a section tag) Hi, You can not uncache a file , but only URI you can put URI into no-cache list if this page works with cookie , you can use cookie to vary the cache Best regards, Hi, Im going to mark this topic Resolved , due to lack of activity. If you still need help, please feel free to re-open it. Best regards,



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference