Refactor paragraphToCache
Refactor errorFromCache