• Resolved erikdemarco

    (@erikdemarco)


    How to set ttl for cache?

    Is the cache gets prune automatically or we need to do it manually?

    And how to set max memory to use for redis?

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

    (@danielbachhuber)

    Hi @erikdemarco,

    The TTL is typically set on a per-cache key basis, by wp_cache_set(). WordPress defaults to no TTL, but TTL can be specified in the function call.

    Configuring Redis itself is outside the scope of what we support.

    Thanks!

    Thread Starter erikdemarco

    (@erikdemarco)

    @danielbachhuber
    So setting ‘WP_REDIS_DEFAULT_EXPIRE_SECONDS’ isnt enough to set the TTL?

    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    I had forgotten about that constant!

    Yes, you can use WP_REDIS_DEFAULT_EXPIRE_SECONDS to set the default TTL to something other than indefinite. However, it won’t override any TTL value passed to wp_cache_set().

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to set ttl for cache?’ is closed to new replies.