Debug_mode check in cache

to test cache implementation set DEBUG_MODE = True