Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save goutomroy/250c2206b1e48a659bf9d46ccd7b8610 to your computer and use it in GitHub Desktop.
Save goutomroy/250c2206b1e48a659bf9d46ccd7b8610 to your computer and use it in GitHub Desktop.
queryset = Entry.objects.all()
# Evaluated and cached
for each in queryset:
print(each.headline)
# Using cache from previous evaluation.
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