Closed hayj closed 6 months ago
I would like to create a RAM only database with no perstistance to be able to share a dict-like object across multiple processes.
Processes are independant (no main process on top), i.e. I basically execute 2 scripts which will open the same shared dict:
$python script_a.py $python script_b.py
I tried this configuration but it still writes on disk. Any idea?
redislite.Redis("/tmp/db1", serverconfig={'save': '', 'appendonly': 'no'})
Maybe I could patch the code (notably this line from redis-py) to prevent the Redis class from periodically save?
I found the solution, we have to pass the quotes: serverconfig={'save': '""', 'appendonly': 'no'}
serverconfig={'save': '""', 'appendonly': 'no'}
I would like to create a RAM only database with no perstistance to be able to share a dict-like object across multiple processes.
Processes are independant (no main process on top), i.e. I basically execute 2 scripts which will open the same shared dict:
I tried this configuration but it still writes on disk. Any idea?
redislite.Redis("/tmp/db1", serverconfig={'save': '', 'appendonly': 'no'})
Maybe I could patch the code (notably this line from redis-py) to prevent the Redis class from periodically save?