Cache 1033476

* [x] Add caching of topics too.
* [x] Make the loading bar disappear at the correct time. Currently it disappears early.

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. 
This won't delay the final promise in this function.