Using size of cache
Checking if we need to update the cache.