Giles Hall wrote:
> I found a problem with SessionDynamicStore. Here is the
> MovetoMemory() function at line 132.
> def MovetoMemory(self, key):
> global debug
> if debug: print ">> Moving %s to Memory" % key
> self._memoryStore[key] = self._fileStore[key]
> del self._fileStore[key]
> Notice how there are two calls to _memoryStore.__getitem__()? The
I think you meant to say _fileStore.__getitem__ right?
> first is used to acquire the session object while the second is
> used to delete
> the session object out of _fileStore. The consequence is that the
> pickled session object will be unpickled twice, which is not only
> unnecessary, but may cause hard-to-track-down logic errors.
> A possible fix would be to create a method within _fileStore
> that will
> both recover and delete the pickled session data. Comments?
Sounds like a good idea to me. The method should be called "pop" because
that's the name of the dictionary method that does the same thing.