Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('redis_object_cache_pro_key_prefixes', function ($prefixes) {
- // Exclude transients and TagDiv-related data from Redis
- $prefixes[] = 'tdc_check_domain'; // Prevent license call caching
- $prefixes[] = 'tdc_license'; // Just in case license is stored here
- $prefixes[] = 'tagdiv'; // Generic
- return $prefixes;
- });
- add_filter('redis_object_cache_should_ignore', function ($ignore, $group, $key) {
- $groups_to_exclude = [
- 'transient', 'transient_timeout', 'tdc_check_domain', 'tdc_license', 'tagdiv'
- ];
- return in_array($group, $groups_to_exclude) ? true : $ignore;
- }, 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment