> Now I'm facing the same problem with SQLObject (using psycopg driver).
> Before digging into the driver code, I wanted to ask -- am I correct
> that there is no commit() after select? Is there a simple way to
> implement it?
I was under the impression that commits happen automatically under
SQLObject, unless you are using transactions.
However, since you mentioned multiple processes, I have run into problems
where a SQLObject cache in one process will not know that a commit has
occurred and will show the cached (stale) object instead. To get around
this in Quixote I expire all SQLObject caches at the end of every request.
I'm not sure if the high level function to do this has been fixed in recent
code. I use the following custom function which seems to get the job done.
def flush_conn(conn):
"""
accepts a DBConnection object and cycles through and expires
all cached items
"""
for key in conn.cache.caches.keys():
for id in conn.cache.caches[key].allIDs():
conn.cache.caches[key].expire(id)
Maybe thats not it at all though....
-Charles.
|