Adding timeouts for the Dictionary based cache
Fixing tests