summaryrefslogtreecommitdiff
path: root/examples/beaker_caching/relation_caching.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-10-21 16:54:42 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-10-21 16:54:42 -0400
commit39d17c76df542d0040c2c8db2d2e3dc897b5cce5 (patch)
treef5aeba8be0f61c0db8d5ba0e76efdaa593cd85c4 /examples/beaker_caching/relation_caching.py
parentf2bc0ddcb496e6a0cb0a0ad88c7c055dbf0c11a7 (diff)
downloadsqlalchemy-39d17c76df542d0040c2c8db2d2e3dc897b5cce5.tar.gz
- converted beaker demo to dogpile.cache, [ticket:2589]
Diffstat (limited to 'examples/beaker_caching/relation_caching.py')
-rw-r--r--examples/beaker_caching/relation_caching.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/examples/beaker_caching/relation_caching.py b/examples/beaker_caching/relation_caching.py
deleted file mode 100644
index f1e5c7886..000000000
--- a/examples/beaker_caching/relation_caching.py
+++ /dev/null
@@ -1,24 +0,0 @@
-"""relationship_caching.py
-
-Load a set of Person and Address objects, specifying that
-related PostalCode, City, Country objects should be pulled from long
-term cache.
-
-"""
-from environment import Session, root
-from model import Person, Address, cache_address_bits
-from sqlalchemy.orm import joinedload
-import os
-
-for p in Session.query(Person).options(joinedload(Person.addresses), cache_address_bits):
- print p.format_full()
-
-
-print "\n\nIf this was the first run of relationship_caching.py, SQL was likely emitted to "\
- "load postal codes, cities, countries.\n"\
- "If run a second time, only a single SQL statement will run - all "\
- "related data is pulled from cache.\n"\
- "To clear the cache, delete the directory %r. \n"\
- "This will cause a re-load of cities, postal codes and countries on "\
- "the next run.\n"\
- % os.path.join(root, 'container_file')