On large projects, filling up cache from zero might take more than default php timeout of 30 seconds.
While currently it seems to work, there is a slight chance that cache might break, so detect if timeout is near and throw new TimeoutException with some meaningfull message, like "try again".