Test if check has defined name much easier and more pythonic
Implement cache reseting logic