To get a key from memcache (using pylibmc), you do this:
client.set(key, {'object': 'dictionary'}, time=expire)
client.get(key)
The same in redis is this:
redis.setex(key, expire, {'object': 'dictionary'})
eval(redis.get(key) or 'None')
That last line doesn't look right to me. redis only seems to return strings. Is there a get redis to return the object in the same form that it was put in?