diff options
Diffstat (limited to 'examples/dogpile_caching/relationship_caching.py')
| -rw-r--r-- | examples/dogpile_caching/relationship_caching.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/dogpile_caching/relationship_caching.py b/examples/dogpile_caching/relationship_caching.py index 76c7e767f..6b261ade9 100644 --- a/examples/dogpile_caching/relationship_caching.py +++ b/examples/dogpile_caching/relationship_caching.py @@ -6,11 +6,15 @@ related PostalCode, City, Country objects should be pulled from long term cache. """ -from .environment import Session, root -from .model import Person, cache_address_bits -from sqlalchemy.orm import joinedload import os +from sqlalchemy.orm import joinedload +from .environment import root +from .environment import Session +from .model import cache_address_bits +from .model import Person + + for p in Session.query(Person).options( joinedload(Person.addresses), cache_address_bits ): |
