making it check the cache automatically