Add timeout to caching