projects
/
invirt/packages/invirt-database.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f226fb
)
Expose the function for clearing the cache.
author
Eric Price
<ecprice@mit.edu>
Sat, 29 Mar 2008 00:24:56 +0000
(20:24 -0400)
committer
Eric Price
<ecprice@mit.edu>
Sat, 29 Mar 2008 00:24:56 +0000
(20:24 -0400)
svn path=/trunk/packages/sipb-xen-database/sipb-xen-database/; revision=287
sipb_xen_database/models.py
patch
|
blob
|
history
diff --git
a/sipb_xen_database/models.py
b/sipb_xen_database/models.py
index
e34051b
..
8b4a389
100644
(file)
--- a/
sipb_xen_database/models.py
+++ b/
sipb_xen_database/models.py
@@
-96,3
+96,11
@@
assign_mapper(ctx, NIC, nic_table)
assign_mapper(ctx, Disk, disk_table)
assign_mapper(ctx, Type, types_table)
assign_mapper(ctx, CDROM, cdroms_table)
+
+def clear_cache():
+ """Clear sqlalchemy's cache.
+
+ This _seems_ to be the way; it works, but the docs don't mention
+ it. Why is this so obscure?"""
+
+ ctx.registry.clear()