From: Mike Bayer Date: Thu, 18 Apr 2013 22:35:45 +0000 (-0400) Subject: - remove erroneous second RelationshipCache class X-Git-Tag: rel_0_8_1~13^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23c43e94b0d7c5d69595d63cc205f3c08fe78fa3;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - remove erroneous second RelationshipCache class --- diff --git a/examples/dogpile_caching/caching_query.py b/examples/dogpile_caching/caching_query.py index 9a705cf314..81ca310606 100644 --- a/examples/dogpile_caching/caching_query.py +++ b/examples/dogpile_caching/caching_query.py @@ -181,24 +181,6 @@ class FromCache(MapperOption): """Process a Query during normal loading operation.""" 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"): - 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."""