Anonymous avatar Anonymous committed 7f7f882

sessionFilter fixis

Comments (0)

Files changed (3)

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:

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")

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.