Skip to content

Instantly share code, notes, and snippets.

@goutomroy
Last active June 7, 2019 16:46
Show Gist options
  • Save goutomroy/844baf8114436724be29d2ec3dd2ee55 to your computer and use it in GitHub Desktop.
Save goutomroy/844baf8114436724be29d2ec3dd2ee55 to your computer and use it in GitHub Desktop.
# repr() evaluates but does not saves results to cache.
queryset = Entry.objects.all()
str_repr = repr(queryset)
# Not using cache.Hitting database again.
for each in queryset:
print(each.headline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment