Alter document search cache to only cache document IDs, and instead cache actual documents in the UidToDocument
cache. At the moment, documents returned from the search request are first cached and then immediately retrieved
from the cache to build the final search result for the user, which is less than ideal.
Change inline TODOs