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 - Status | 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)
5 Posts 4 Posters 800 Views 4 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 on 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 Online
      jamesJ Online
      james
      Staff
      wrote on 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 Online
        J Online
        joseph
        Staff
        wrote on 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 on 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
          • B Offline
            B Offline
            BLUBBERLUTSCH
            wrote on last edited by
            #5

            That would indeed be useful.

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            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