Updates the documentation on how the cache works to more closely match the implementation and to explain some of the design decisions.