Support » Plugin: Redis Object Cache » Is it possible to Define TTL on woocommerce product quantity only?

  • Resolved leonardorodriguez

    (@leonardorodriguez)


    I have 2 servers using same database (not multisite)

    In order to refresh items quantity on both ends, i’ve set short Define TTL on both wp-config

    I would like to do that only on product quantity key, and not as a whole. As default TTL for everything, but 5 mins on product quantity

    Is it any way to do it?

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

    (@tillkruess)

    There currently isn’t. You can submit a PR to add a filter to the plugin if you like.

    However, it sounds like you’ve got an invalidation issue and setting a shorter TTL doesn’t really fix the problem.

    leonardorodriguez

    (@leonardorodriguez)

    Thanks for your reply

    – If not by quantity alone, is it possible to doit on products (and not te rest of the site)?

    – About invalidation, i believed thats exactly how it should work

    Since both vps have diferent theme and plugins, i can’t share the same keysalt. I have to use one for each

    When i edit stock on site A, B site can’t see it because it owns keysalt_b still has old value

    I thought that’s how its supposed to work. Do you think i an invalidation issue?

    Plugin Author Till Krüss

    (@tillkruess)

    The code that’s caching the objects needs set sensible expiration times.

    That’s the way to control the expiration properly.

    leonardorodriguez

    (@leonardorodriguez)

    That code es in plugin or in redis itself?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.