Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. How to set Redis eviction policy (e.g. allkeys-lru) for WordPress app

How to set Redis eviction policy (e.g. allkeys-lru) for WordPress app

Scheduled Pinned Locked Moved WordPress (Developer)
4 Posts 3 Posters 50 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Miroo
    wrote last edited by
    #1

    Hey!
    i’m using the WordPress app on Cloudron with the Redis Object Cache plugin.
    i’ve allocated 4 GB RAM to Redis, but it keeps filling up over time because there’s no TTL on the keys. i’d rather use Redis’s built-in eviction instead of fixed expirations, like allkeys-lru or allkeys-lfu, so it automatically removes least-used or oldest keys when full.

    i couldn’t find any option for eviction policy in the Cloudron UI or documentation.
    how can i set (or persist) maxmemory-policy allkeys-lru for the Redis instance that my WP app uses?
    and where is the redis.conf file located for that instance (if it’s editable from the terminal)?

    thanks!

    1 Reply Last reply
    2
    • jamesJ Offline
      jamesJ Offline
      james
      Staff
      wrote last edited by
      #2

      Hello @Miroo
      Right now it is not possible to configure the Redis service manually that comes with apps.
      The default setting for each redis service is:

      maxmemory-policy noeviction
      

      See: https://git.cloudron.io/platform/redis-addon/-/blob/master/redis.conf

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joseph
        Staff
        wrote last edited by
        #3

        @Miroo you can set define('WP_REDIS_MAXTTL', '900'); in your wp-config.php . See https://github.com/rhubarbgroup/redis-cache/blob/main/README.md#configuration

        M 1 Reply Last reply
        1
        • J joseph

          @Miroo you can set define('WP_REDIS_MAXTTL', '900'); in your wp-config.php . See https://github.com/rhubarbgroup/redis-cache/blob/main/README.md#configuration

          M Offline
          M Offline
          Miroo
          wrote last edited by
          #4

          @joseph said in How to set Redis eviction policy (e.g. allkeys-lru) for WordPress app:

          @Miroo you can set define('WP_REDIS_MAXTTL', '900'); in your wp-config.php . See

          Thanks but It's less efficient than changing Redis's own eviction policies, as you can set it in a way that it would delete the less used ones instead of just a general expiration for all of them.

          @james said in How to set Redis eviction policy (e.g. allkeys-lru) for WordPress app:

          Right now it is not possible to configure the Redis service manually that comes with apps.
          The default setting for each redis service is:

          Is it possible to get this settings in the future releases? it will be greatly appreciated!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search