//The crawler takes a cache as parameter. The cache can be //either empty (starting url never crawled) or already full //with pages previously crawled - this is determined by the //content of the target directory. public Crawler(Cache cache, bool followExternalLinks) { _queue = new FetcherQueue(OnPageLoaded); _queue.ProcessingOver += () => { if (WorkComplete != null) { WorkComplete(); } }; _cache = cache; _followExternalLinks = followExternalLinks; }