HtmlAgilityPack.HtmlWeb.GetCachePath C# (CSharp) Method

GetCachePath() public method

Gets the cache file path for a specified url.
public GetCachePath ( Uri uri ) : string
uri System.Uri The url fo which to retrieve the cache path. May not be null.
return string
        public string GetCachePath(Uri uri)
        {
            if (uri == null)
            {
                throw new ArgumentNullException("uri");
            }
            if (!UsingCache)
            {
                throw new HtmlWebException("Cache is not enabled. Set UsingCache to true first.");
            }
            string cachePath;
            if (uri.AbsolutePath == "/")
            {
                cachePath = Path.Combine(_cachePath, ".htm");
            }
            else
            {
                cachePath = Path.Combine(_cachePath, (uri.Host + uri.AbsolutePath).Replace('/', '\\'));
            }
            return cachePath;
        }