Cache not used for ForeignKey
Closed this issue · 0 comments
meastman commented
The cache isn't used for ForeignKey
s, even when use_for_related_fields = True
is set for the manager.
Django does the equivalent of Class.objects.filter(id=42).get()
instead of Class.objects.get(id=42)
, and ormcache skips the cache lookup because the .get()
call is on a filtered queryset.