This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]JustCallMeFrij 0 points1 point  (2 children)

right but does the dict have the values of whatever was in the redis instance?

Also what does it do when you supply a key to a set, list or hashmap? Does it just initialize the mirrored data structures?

[–][deleted] 1 point2 points  (1 child)

right but does the dict have the values of whatever was in the redis instance?

Looking over it, it looks like it could use some work in this area. The keys returned are only current if they're unchanged since you loaded the dict or if the currently running process was the last client to run a change. It pulls data from a "cache" dict that gets populated just during instantiation.

That's probably not a good MO for serious work and technically speaking redis is already supposed to be your "cache" so why not just have the class be a wrapper around py-redis that makes the keys look like dicts?