-1

I can start my server and see it's live on port 3658. I create a SET and view it's stored. I close the server and confirm it's not running. Can someone help me understand exactly how this is happening, and why the same can't/won't occur for memcache?

jj1111
  • 327
  • 7
  • 15

2 Answers2

1

One of the features that Redis provides is tunable disk persistence. You can turn on snapshot style (RDB) or changelog style (AOF) to persist data to disk. If you have disk persistence turned on, when you execute a SET command, the change will get persisted and reloaded when you restart the server. More information about Redis persistence can be found here.

Memcache is designed to be a cache only and doesn't provide any mechanism for disk persistence.

Tague Griffith
  • 3,153
  • 1
  • 16
  • 23
0

You can find the detailed answer here.

Rest for quick info:

Redis used to store data on disk into rdb file. You can check that file on your system. To test this thing you can rename your rdb file (that will be possibly dump.rdb file which is already defined in your Redis Configuration file). When you'll rename your rdb file, Redis server will search for that default file which will not be there so it will not found your previously saved data.

Mayank Jain
  • 361
  • 4
  • 18