• Resolved danniee

    (@danniee)


    Hi,

    First of all, thank you for a fantastic plugin and for your generous support.

    I have a custom made plugin on my front page that displays review scores. It doesn’t get updated since I installed Redis whenever a new score is added. Is there a way from excluding this plugin from being cached by Redis?

    I tried doing some research and it seems like it should be possible. I’m not very good at this so I did not quite understand where to add the string, etc. Maybe someone can point me in the right direction?

    Many thanks.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Hi @danniee!

    That depends on how your custom plugin caches things. You can ignore cache group using the WP_REDIS_IGNORED_GROUPS constant. Maybe post the code that does the caching ??

    Thread Starter danniee

    (@danniee)

    Thank you. Sounds like I will need to hire a programmer for this since the plugin was custom built and I don’t know much about coding :/

    Plugin Author Till Krüss

    (@tillkruess)

    Yeah, unless you’re somewhat technical it would be best to talk to a developer about this.

    Thread Starter danniee

    (@danniee)

    Hi, still haven’t found someone able to help me with this, so it’s a bit of a problem for me. Would it at least be possible to add a “flush cache” option in the admin bar so people don’t have to go to the backend and find Redis every time they need to do that? Thank you.

    Thread Starter danniee

    (@danniee)

    No one seem to be able to help me with this. They just tell me to ask the plugin author.

    I tried adding this to wp-config:

    define( ‘WP_REDIS_IGNORED_GROUPS’,array ( ‘mts_recent_reviews’, ‘wp-review’, ‘wp_review_total’) );

    or

    define( ‘WP_REDIS_IGNORED_GROUPS’, ‘mts_recent_reviews’, ‘wp-review’, ‘wp_review_total’ );

    But the cached content is still not being updated.

    • This reply was modified 3 years, 1 month ago by danniee.
    Plugin Author Till Krüss

    (@tillkruess)

    Hi @danniee

    The first one is correct:

    
    define( 'WP_REDIS_IGNORED_GROUPS', array(
      'mts_recent_reviews',
      'wp-review',
      'wp_review_total',
    ) );
    

    I don’t know which cache groups you are trying to ignore, but the individual plugin authors will be able to provide you with them.

    Thread Starter danniee

    (@danniee)

    Hi @tillkruess

    Thank you for helping me. I tried adding it like that but it makes no difference, so I assume I am missing the correct groups to exclude. I will ask the plugin author. Thank you again ??

    Thread Starter danniee

    (@danniee)

    No one seems to be able to help me solve this, not even the devs I’ve asked seem interested. I guess it’s too small of a job for them.

    I tried excluding “transients” and that works, but I suspect that is far too wide of a group to exclude to make Redis compatible with the review plugin :/

    Plugin Author Till Krüss

    (@tillkruess)

    I tried excluding “transients” and that works, but I suspect that is far too wide of a group to exclude to make Redis compatible with the review plugin :/

    You’re assumption is correct. Ideally you reach out the the individual plugin authors and ask them to fix their plugins when using persistent object caching.

    Thread Starter danniee

    (@danniee)

    Hi, I fixed it for this plugin. Just wanted everyone to know if they are reading this. In the plugin I changed:

    protected $no_cache = false;

    to

    protected $no_cache = true;

    ??

    Plugin Author Till Krüss

    (@tillkruess)

    Hi @danniee! That code does not belong to this plugin.

    https://github.com/rhubarbgroup/redis-cache/search?q=no_cache

    Thread Starter danniee

    (@danniee)

    Hi,

    I’m not sure what you mean? I edited my review plugin so it does not get cached by Redis ??

    Plugin Author Till Krüss

    (@tillkruess)

    Ah, thanks for the explanation.

    In which file should one place the exclusion rules mentioned above? wp-config.php? Thanks.

    Nick

    (@nickchomey)

    FYI, I’ve updated this github issue with a workaround/snippet for adding a button to the admin bar for clearing the Object Cache

    https://github.com/rhubarbgroup/redis-cache/issues/224

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Excluding certain plugin’ is closed to new replies.