0

How can I make REDISsave least recently used data to disk in order to save some memory?

I have seen the documentation of REDIS but I only found how to set the memory limit to a specific amount of MB and the all eviction policies say that when a new item should be inserted to the database old ones should be deleted, but I need them to be stored in the disk, how can I do that?

bitoiu
  • 6,893
  • 5
  • 38
  • 60
flashdisk
  • 3,652
  • 3
  • 16
  • 22
  • 5
    Redis is an in - memory database and as such it stores ALL data in RAM. Disk is (optionally) used only to persist the data, so that if and when there's a failure/shutdown, data is loaded to RAM after restarting Redis. There's no way in standard Redis to do what you're skiing for. – Itamar Haber Mar 19 '15 at 08:03

1 Answers1

0

Well the answer to this is not to use Redis, but instead to use a Redis compatible database like Ardb which in turn can be configured to use LevelDB under the hood which supports LRU type on-disk caches.

Matthew O'Riordan
  • 7,981
  • 4
  • 45
  • 59