Added tests for document caching.