Support » Plugin: Redis Object Cache » how to exclude the homepage from being cached?

  • Resolved ianx

    (@ianx)


    hi,
    I use redis for my site.
    But myhome page post not update for new article.
    its maybe because redis?
    i try to flushall post udpated.
    how to exclude the homepage from being cached?

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

    (@tillkruess)

    This plugin is not a page cache. It is an object cache. Check your other plugins.

    Hi Till, first of all HUGE thank you for this awesome plugin!!!

    With ref to the home page, I have the same problem and reason being the home page consists of various widgets and they are treated as objects so with Redis on the home page does not update where it should flush with post save/update/publish.

    I might have to setup a filter/function so that for every post save/update “wp cache flush” is run but I will figure it out somehow as home page only is not really going to be that easy to do.

    So more then as a feature request maybe add the functionality so that cache flushed after post save/update then at least all feeds updated. 🙂

    Plugin Author Till Krüss

    (@tillkruess)

    @tripledm: WordPress automatically flushes some cached items when they change, so the widgets you’re using should either hook into the events themselves or just use the right API to get their data.

    Alternatively, you can exclude cache groups, but TBH this is in most cases the wrong approach.

    @tillkruess thank you for the response.

    I have setup the exclusions and TTL in wp-config.php:

    define(‘WP_REDIS_MAXTTL’, ‘240’);
    define(‘WP_REDIS_IGNORED_GROUPS’,array(‘rss’,’counts’));

    So the TTL of 240 seconds helps a lot until I can figure out how to not cache or flush only the widgets/blocks used to filter and display content on the home page.

    Diagnostics also shows:
    Ignored Groups: [
    “rss”,
    “counts”,
    “plugins”,
    “themes”
    ]

    So I would have hoped they would be excluded from object cache as themes & plugins ignored but my search will go on. Thank you for your help and advice!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to exclude the homepage from being cached?’ is closed to new replies.