Skip to content

Make it easy to invalidate auth.User (and other 3rd-party models) #1

Open
@dziegler

Description

@dziegler

This looks interesting and is very similar to what I've been working on. I could be missing something, but from what I can tell queries on related tables won't get invalidated. For example:

profile = Profile.objects.filter(user__username="test")

should get invalidated when either profile or user are saved/deleted, but I think this would only invalidate when profile is saved/deleted.

Also, the post_save and post_delete signals won't get fired on queryset.update, so if I were to do something like Profile.objects.filter(user__username="test").update(username="something else")

then Profile.objects.filter(user__username="test") will return a stale object. You could override the queryset's update method, but you'd still have the same problem as above with related models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions