diff options
Diffstat (limited to 'examples/dogpile_caching/caching_query.py')
| -rw-r--r-- | examples/dogpile_caching/caching_query.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/examples/dogpile_caching/caching_query.py b/examples/dogpile_caching/caching_query.py index 060c14613..3d528b880 100644 --- a/examples/dogpile_caching/caching_query.py +++ b/examples/dogpile_caching/caching_query.py @@ -17,9 +17,10 @@ The rest of what's here are standard SQLAlchemy and dogpile.cache constructs. """ +from dogpile.cache.api import NO_VALUE + from sqlalchemy.orm.interfaces import MapperOption from sqlalchemy.orm.query import Query -from dogpile.cache.api import NO_VALUE class CachingQuery(Query): @@ -187,14 +188,14 @@ class FromCache(MapperOption): """Construct a new FromCache. :param region: the cache region. Should be a - region configured in the dictionary of dogpile - regions. + region configured in the dictionary of dogpile + regions. :param cache_key: optional. A string cache key - that will serve as the key to the query. Use this - if your query has a huge amount of parameters (such - as when using in_()) which correspond more simply to - some other identifier. + that will serve as the key to the query. Use this + if your query has a huge amount of parameters (such + as when using in_()) which correspond more simply to + some other identifier. """ self.region = region @@ -215,14 +216,14 @@ class RelationshipCache(MapperOption): """Construct a new RelationshipCache. :param attribute: A Class.attribute which - indicates a particular class relationship() whose - lazy loader should be pulled from the cache. + indicates a particular class relationship() whose + lazy loader should be pulled from the cache. :param region: name of the cache region. :param cache_key: optional. A string cache key - that will serve as the key to the query, bypassing - the usual means of forming a key from the Query itself. + that will serve as the key to the query, bypassing + the usual means of forming a key from the Query itself. """ self.region = region |
