예제 #1
0
        public static UrlCache CreateIndexedCache(string directory, UrlFileNameType urlFileNameType = UrlFileNameType.Host | UrlFileNameType.Path | UrlFileNameType.Ext | UrlFileNameType.Query)
        {
            if (directory == null)
            {
                return(null);
            }
            UrlCache urlCache = new UrlCache(directory);

            urlCache._urlFileNameType = urlFileNameType;
            urlCache._indexedFile     = true;
            urlCache._saveRequest     = true;
            return(urlCache);
        }
예제 #2
0
        //private string _GetUrlSubDirectory(HttpRequest httpRequest)
        //{
        //    if (_getUrlSubDirectory != null)
        //        return _getUrlSubDirectory(httpRequest);
        //    else
        //        return null;
        //}

        //private string GetUrlFilename(HttpRequest httpRequest)
        //{
        //    return zurl.UrlToFileName(httpRequest, _urlFileNameType);
        //}

        public static UrlCache Create(XElement xe)
        {
            if (xe != null && xe.zXPathValue("UseUrlCache").zTryParseAs(false))
            {
                UrlCache urlCache = new UrlCache(xe.zXPathExplicitValue("CacheDirectory"));
                urlCache._urlFileNameType = zurl.GetUrlFileNameType(xe.zXPathValue("CacheUrlFileNameType", "Path"));
                urlCache._indexedFile     = xe.zXPathValue("IndexedFile").zTryParseAs(false);
                urlCache._saveRequest     = xe.zXPathValue("CacheSaveRequest").zTryParseAs(false);
                return(urlCache);
            }
            else
            {
                return(null);
            }
        }
예제 #3
0
파일: HttpCache.cs 프로젝트: 24/source_04
        //public HttpManager_v3 HttpManager { get { return _httpManager; } set { _httpManager = value; } }
        //public UrlCache UrlCache { get { return _urlCache; } set { _urlCache = value; } }

        public HttpCacheManager(HttpManager_v5 httpManager, UrlCache urlCache)
        {
            _httpManager = httpManager;
            _urlCache    = urlCache;
        }
예제 #4
0
 public void SetCacheManager(UrlCache urlCache)
 {
     _httpCacheManager = new HttpCacheManager(this, urlCache);
 }