• Resolved Marisa

    (@marisa2023)


    Yesterday I added the Redis server and WordPress Redis Object Cache.

    There isn’t a dramatic difference in page speed.

    I was wondering if this is because I’m using a handful of plugins such as PolyLang and LocoTranslate. Unlike posts, pages and membership data, their database information should be reasonably static.

    However can I make Redis Object Cache start to cache plugins such as PolyLang and LocoTranslate.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Marisa

    (@marisa2023)

    I am using the plugin Max Mega Menu. Its data will be entirely static. How do I make Redis cache this plugin? I think this will be a better target than the other two.

    Thread Starter Marisa

    (@marisa2023)

    I am seeing if performance can be improved by adding.

    wp_cache_add_global_groups([
    ‘terms’,
    ‘term_relationships’,
    ‘term_meta’
    ]);

    as I think these won’t be in the Redis cache.

    Plugin Author Till Krüss

    (@tillkruess)

    it’s up to the authors of Max Mega Menu to leverage object caching in their code.
    Redis Object Cache is just an API.

    Thread Starter Marisa

    (@marisa2023)

    Actually I found the source of the problem now. It isn’t anything to do with Max Mega Menu, PolyLang or LocoTranslate.

    Quite a bit of WordPress and plugins will use groups terms, term_relationships and term_meta. I’ve already added them to the Redis Cache. The website still works.

    But what do you think? By default the groups terms, term_relationsips and term_meta are not cached. If the underlying database rows are altered will this cause problems or will Redis Object Cache invalidate the keys and get fresh data.

    • This reply was modified 2 weeks, 2 days ago by Marisa.
    Plugin Author Till Krüss

    (@tillkruess)

    What do you mean these are not cached by default?

    By default the groups terms, term_relationsips and term_meta are not cached.

    Thread Starter Marisa

    (@marisa2023)

    I am very new to Redis. I only installed it a couple of days ago. Is my understanding correct? If the underling database rows which map to the groups terms, term_relationships and term_meta are modified will the Redis Object Cache still return the correct results on the assumption the below code has been excecuted?

    wp_cache_add_global_groups([
    ‘terms’,
    ‘term_relationships’,
    ‘term_meta’
    ]);

    Plugin Author Till Krüss

    (@tillkruess)

    The global groups feature is only for WordPress Multisite Networks, are you sing those?

    Thread Starter Marisa

    (@marisa2023)

    No, I don’t have a WordPress Multisite.

    What function call should I use to add the groups terms, term_relationships and term_meta?

    Plugin Author Till Krüss

    (@tillkruess)

    Add the groups to what specifically?

    You can see all configuration options outlined in the plugin’s README.

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

You must be logged in to reply to this topic.