Bug fixes:
-Cache: there was a bug in the tracking of the number of files opened
-Fixed a bug where preview was asked to render twice
-Cache: clearing cache wouldn't always clear the cache entirely