Bombsquad.DynamicMedia.Implementations.Cache.FileSystemBasedMediaCache.TryServeRequestFromCache C# (CSharp) 메소드

TryServeRequestFromCache() 공개 메소드

public TryServeRequestFromCache ( string path, IFormatInfo outputFormat, IResult &result ) : bool
path string
outputFormat IFormatInfo
result IResult
리턴 bool
        public bool TryServeRequestFromCache(string path, IFormatInfo outputFormat, out IResult result)
        {
            var cacheFile = GetCacheFileInfo(path, outputFormat);

            if (!cacheFile.Exists)
            {
                result = null;
                return false;
            }

            var etag = m_fileInfoETagCalculator.CalculateETag( cacheFile );
            result = new TransmitFileResult(cacheFile.LastWriteTime, etag, cacheFile.Length, cacheFile.FullName);
            return true;
        }