Closed qiangwang closed 10 years ago
As of simplekv 0.9.2, this can be achieved using PrefixDecorator:
store = ... # setup store normally
prefixed_store = PrefixDecorator('sessions_', store)
# ...
KVSessionExtension(prefixed_store, app)
The decorator will transparently prefix sessions_ to every session key stored and strip it upon retrieval. See the simplekv docs for details.
I agree it should be possible to namespace the keys.
Currently you just end up with a massive list of randomly generated keys.