Adding in cache support, needs to be tested (BROKEN)