Commits

Michael Robinson  committed 7f7f882

sessionFilter fixis

  • Participants
  • Parent commits c8380df

Comments (0)

Files changed (3)

File cherrypy/lib/filter/sessionfilter/basesession.py

         session.threadCount = 0
         self.setSession(session)
         
-        cacheTimeout = sessionconfig.retrieve('%s.cacheTimeout' % self.sessionName, None)
-        if not cacheTimeout:
-            cacheTimeout = sessionconfig.retrieve('sessionFilter.cacheTimeout', None)
+        cacheTimeout = sessionconfig.retrieve('cacheTimeout',  self.sessionName, None)
         
         if session.threadCount == 0 and not cacheTimeout:
             del self.__sessionCache[sessionKey]
     def cleanUpCache(self):
         """ cleanup all inactive sessions """
         
-        cacheTimeout = sessionconfig.retrieve('%s.cacheTimeout' % self.sessionName, None)
+        cacheTimeout = sessionconfig.retrieve('cacheTimeout',  self.sessionName, None)
         
         # don't waste cycles if we aren't caching inactive sessions
         if cacheTimeout:

File cherrypy/lib/filter/sessionfilter/filesession.py

     # all session writes are blocked 
     def getSession(self, sessionKey):
         sessionStorageFileDir = self.__storageDir()
-        print sessionStorageFileDir, sessionKey
         fname = os.path.join(sessionStorageFileDir, sessionKey)
         if os.path.exists(fname):
             f = open(fname, "rb")

File cherrypy/lib/filter/sessionfilter/sessionfilter.py

     path = cpg.config.get('sessionFilter.new', returnSection = True )
     paths=os.path.split(path)
     
-    sessionNames = cpg.config.getAll('sessionFilter.new')
+    sessionNames = cpg.config.getAll('sessionFilter.new')
     for sessionPath in sessionNames:
         sessionName = sessionNames[sessionPath]
         sessionManager = cpg.config.get('%s.sessionManager' % sessionName, None)