Specify using for relations
Specify using for relations

This means that when there is a cache miss, the database that is currently in
use will be used to fetch the data.

For example, if you have a database slave, model Foo with a cached relation
bar, which has a property baz:
    random_foo = Foo.objects.order_by('?').using('slave').first()

    # On cache misses, this will hit the database slave, as that is what was
    # used to fetch baz.
    baz = random_foo.bar_cache.baz

lamby/django-cache-toolbox