working on making document retrieval use the cache...