Added code to reset cache and test the same. Also cache will now disable
in case of exceptions.