First attempt at implementing assistant cache, not used anywhere so far, lots of TODOs.