From 12272d52d0506bf484eaaa769bd6fe9da8c67dd5 Mon Sep 17 00:00:00 2001 From: beckerfy <fynn.becker@hs-hannover.de> Date: Fri, 29 Jan 2021 12:17:04 +0100 Subject: [PATCH] Fix README information on caching --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 779dbf0..e58a6d5 100644 --- a/README.md +++ b/README.md @@ -114,8 +114,9 @@ Here's a short snippet explaining the gist of it: # Good: Uses the cache resulting in only a single API request >>> with postgrestutils.Session() as s: -... print([role['id'] for role in s.filter('business_role')]) # fetches all elements into the cache -... print([role['name'] for role in s.filter('business_role')]) # re-uses the cached elements +... business_roles = s.filter('business_role') +... print([role['id'] for role in business_roles]) # fetches all elements into the cache +... print([role['name'] for role in business_roles]) # re-uses the cached elements ``` ##### When results are not cached -- GitLab