diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-18 18:35:45 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-18 18:35:45 -0400 |
| commit | 23c43e94b0d7c5d69595d63cc205f3c08fe78fa3 (patch) | |
| tree | b2940abb4231ca501b41cdebe44c452d2e59cdee /examples/dogpile_caching/caching_query.py | |
| parent | 0790efcf87a268fd8bc810b711fe2b9760bcf1e6 (diff) | |
| download | sqlalchemy-23c43e94b0d7c5d69595d63cc205f3c08fe78fa3.tar.gz | |
- remove erroneous second RelationshipCache class
Diffstat (limited to 'examples/dogpile_caching/caching_query.py')
| -rw-r--r-- | examples/dogpile_caching/caching_query.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/examples/dogpile_caching/caching_query.py b/examples/dogpile_caching/caching_query.py index 9a705cf31..81ca31060 100644 --- a/examples/dogpile_caching/caching_query.py +++ b/examples/dogpile_caching/caching_query.py @@ -187,24 +187,6 @@ class RelationshipCache(MapperOption): propagate_to_loaders = True - def __init__(self, attribute, region="default"): - self.region = region - self.cls_ = attribute.property.parent.class_ - self.key = attribute.property.key - - def process_query_conditionally(self, query): - if query._current_path: - mapper, key = query._current_path[-2:] - if issubclass(mapper.class_, self.cls_) and \ - key == self.key: - query._cache_region = self - -class RelationshipCache(MapperOption): - """Specifies that a Query as called within a "lazy load" - should load results from a cache.""" - - propagate_to_loaders = True - def __init__(self, attribute, region="default", cache_key=None): """Construct a new RelationshipCache. |
