Ejemplo n.º 1
0
        /// <summary>
        /// 更新缓存
        /// </summary>
        /// <param name="content">渲染结果</param>
        protected virtual ICachedResponse UpdateCache(string content)
        {
            var response = new RawResponse();

            response.Content = content;
            response.Headers.Add("ContentType", "text/html");

            return(response);
        }
Ejemplo n.º 2
0
        private ICachedResponse CreateCachedResponse(ContentResult content)
        {
            var response = new RawResponse()
            {
                Content         = content.Content,
                ContentEncoding = content.ContentEncoding,
            };

            response.Headers.Add("ContentType", content.ContentType);

            return(response);
        }