Created
June 7, 2019 16:35
-
-
Save goutomroy/6e80256343ab5bee989d30ae9221006c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
queryset = Entry.objects.all() | |
# Queries the database because queryset hasn't been evaluated yet. | |
print(queryset[5]) | |
# Queries the database because queryset hasn't been evaluated yet. | |
print(queryset[5]) | |
lst = list(queryset) | |
# Using caches because evaluation happened in previous list(). | |
print(queryset[5]) | |
print(queryset[10]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment