[TASK] Catch exception in TS2 Cache object

+ Small refactoring to simplify the cache object implementation