Add timeout feature to the cache