Wordpress LScache Plugin: Purge cache when Advanced Custom Fields field updated
Last Updated on: Wed, 15 Apr 2026 00:00:02 Im on a LiteSpeed server and use LiteSpeed chace plugin. I am using Advanced Custom Fields plugin, and set up a User Options page where the user can set values to some ACF fields. Those ACF fields values should be displayed on some pages for that specific user. The problem is that, when the user updates the ACF fields, those changes doesnt show up until I purge cache manually. I want to be able to clear cache automatically for specific pages, when a user updates some ACF fields. How can I achieve this, using action hooks or any other tool from both plugins? Yes, you can add the hook on our plugin for auto purging, please try to add acf/update_value to LiteSpeed Cache > Setting > Advance > Purge All Hooks. Hi, can you give some examples which certain pages you want to be purged? And what cache tags does it have? Thanks @hailite for the reply, I want to clear cache for a specific post type that I have created in my theme. Thanks @stanleylitespeed I added acf/update_value to purge all hooks, but it didnt clear the cache. On the other hand, I dont want to purge ALL caches, I am looking for a way to purge the cache for a specific post type. I felt its not a general case that can be covered by LSCWP. Maybe you should do the purge by custom codes in theme. @hailite yes definitely I know that it should be done by custom code, but I was unable to accomplish that. It would be great if you could give some hints on how to do it. 1. Find the tags that specific pages are using. e.g. They all contain a cache tag xxx_tagA. 2. Find the hook that ACF is using when updating the fields. e.g. It has do_action( update_field_a ) 3. Add this to your themes functions.php: add_action( update_field_a, function() LiteSpeed_Cache_API::purge( update_field_a ) ) The above is just a sample. If you dont have PHP experience, you may need to get one PHPer to do the job.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference