Changeset 2993 for trunk/packages


Ignore:
Timestamp:
Feb 21, 2010, 12:55:52 AM (15 years ago)
Author:
broder
Message:

Clear all objects from the SQLAlchemy session at the start of each request.

The SA identity mapper isn't *supposed* to be a cache, but it sure can
act like one sometimes.

Location:
trunk/packages/invirt-web/code
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/invirt.fcgi

    r2743 r2993  
    4343        '/': {
    4444            'tools.invirtwebstate.on': True,
     45            'tools.clear_db_cache.on': True,
    4546            },
    4647        }
  • trunk/packages/invirt-web/code/view.py

    r2737 r2993  
    88from StringIO import StringIO
    99from invirt.config import structs as config
     10import invirt.database
    1011from webcommon import State
    1112
     
    164165
    165166
     167cherrypy.tools.clear_db_cache = cherrypy.Tool('on_start_resource', invirt.database.clear_cache)
     168
     169
    166170class View(object):
    167171    _cp_config = {'tools.mako.directories':
Note: See TracChangeset for help on using the changeset viewer.