Open olatechpro opened 1 month ago
The issue seems not to be from Capabilities but the cache plugin. They're not flushing wp cache when their flush cache is clicked.
Here's where Capabilities uses cache data https://github.com/publishpress/PublishPress-Capabilities/blob/development/includes/features/frontend-features/frontend-features-restrict.php#L47
We're using wp_cache_set
and wp_cache_get
to store and get cache data of frontend features which is WordPress default way.
In my test, I noticed the wp_cache_get
keep returning cache data(which is empty) even after flushing cache.
I think they should reach out to the plugin support with this information (on their flush cache button not clearing wp_cache data) and then get back to us.
If they want a quick fix till they get response, they can replace
$page_restriction_data = wp_cache_get($cache_key, 'data');
with
$page_restriction_data = false;
So capabilities will always fetch new data
From: https://secure.helpscout.net/conversation/2654571930/224318?viewId=2557461