• Resolved revaxarts

    (@revaxarts)


    Hi!

    I want to know if there’s an option to bypass certain groups the get cached

    When I’m using

    wp_cache_set($value, $data, 'my-group')

    I would whitelist the ‘my-group’ because the cache should only stay for the current pageload (like it’s default by WordPress)

    https://ww.wp.xz.cn/plugins/wp-redis/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    You can disable persistance for a group with wp_cache_add_non_persistent_groups():

    wp_cache_add_non_persistent_groups( array( 'my-group' ) );

    Plugin Contributor Daniel Bachhuber

    (@danielbachhuber)

    And, just to be clear, you’ll want to call wp_cache_add_non_persistent_groups() before you call wp_cache_set() with your group.

    Thread Starter revaxarts

    (@revaxarts)

    Hey Daniel!

    Thanks for that! Didn’t know about that method.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bypass certain groups’ is closed to new replies.