WIP: Implements caching infrastructure