Skip to content

feature request: related model caching #3

Description

@kesor

I am using this technique in some of my models to cache related objects of GenericRelation(s), would this be a possible feature for django-orm-cache to implement?

Code

Example of this kind of caching:

comp = Computer.objects.get(pk=1)
comp.labels.all()                     # queries db and puts comp's labels in the cache
comp.labels.all()                     # returns objects from the cache instead of db
comp.labels.create(name="new label")  # invalidates the cache for comp.labels
comp.labels.all()                     # queries db and puts comp's labels in the cache
comp.labels.get(pk=1).delete()        # invalidates comp's label cache

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions