I have either a missunderstanding or cache-control has a bug or documentation is wrong. It's about cache-control directive and to purge private cache with .htaccess RewriteRule.
In LiteSpeed documentation https://docs.litespeedtech.com/lscache/devguide/controls/#cache-control there are usage examples that don't work for me.
If it is set with a RewriteCond to me, private cache will be flushed, but what does flush exactly mean?
Is flush == purge?
If yes, it doesn't work. I have some private ESI cache sections and cache of these sections will not be purged, but may be my rules are wrong or I missunderstand it.
This is how I use this directive:
***************************************************************************
If not set private cache will be auto-flushed by POST request. I have POST requests, but private cache will not be purged, if flush means purge. Again, what does flush mean? If flush is purge this directive doesn't work for private cache in ESI sections with POST requests.
In LiteSpeed documentation https://docs.litespeedtech.com/lscache/devguide/controls/#cache-control there are usage examples that don't work for me.
Code:
Flush private cache
RewriteRule /flush_cache - [E=cache-control:flush]
Is flush == purge?
If yes, it doesn't work. I have some private ESI cache sections and cache of these sections will not be purged, but may be my rules are wrong or I missunderstand it.
This is how I use this directive:
Code:
RewriteCond %{QUERY_STRING} action=add_product
RewriteRule /flush_cache - [E=cache-control:flush]
***************************************************************************
Code:
Disable auto flush private cache by POST request:
RewriteRule .* - [E=cache-control:no-autoflush]