Initial document cache implementation

This PR aims to implement #10

- [ ] In-memory document cache
- [ ] Cache lifetimes and garbage collection
- [ ] Disk-backed storage for documents with infinite lifetime