https://github.com/HBN3tw0rk/dcache/tree/master#multiple-backends Ideia: ```python from dcache import dcache from dcache.backends import InMemoryBackend, RedisBackend @dcache(multiple=[ InMemoryBackend(), RedisBackend(host='localhost', port=6379, db=0), ]) def slow_function(n): return n ** 1000 ``` 1. search on the in-memory cache; 2. if exists, return, if not, search on Redis; 3. * if exists on Redis, save in memory and return; 4. * if not, exists on Redis, run the `slow_function`, save on Redis, save in-memory and return; * doesn't run if already returned
https://github.com/HBN3tw0rk/dcache/tree/master#multiple-backends
Ideia:
slow_function, save on Redis, save in-memory and return;