Exclude files or paths by exception from cache
-
Great plugin, keep up the good work.
The only thing it’s missing is the ability to exclude certain pages or files from being cached.
For e.g.
one specific file,
or a file / folder matching with a regex
for pages if a user is logged inThere are a few people asking for this:
https://ww.wp.xz.cn/support/topic/clear-cache-for-a-specific-page/
https://ww.wp.xz.cn/support/topic/disable-for-logged-in-users-3/Would be great to hear from the creators what the plan is for this and if there is any acceptable workaround in the meantime?
One idea I had was to manually make changes to the
.htaccessfile with different expires headers. Would this interfere in anyway with the plugin?Something like this in the
.htaccessfile:<Files do-not-cache-this-file.php> FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" </Files>or
<filesMatch "\.(php)$"> FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" </filesMatch>
The topic ‘Exclude files or paths by exception from cache’ is closed to new replies.