Cache 1033476

* [ ] Add caching of topics too.

This adds an option for updating the cache if the user doesn't have many documents cached already.

* Many is defined as 5 or less. 
Nit: Write these lines as `} else {`