예제 #1
0
        /*public NginxWebCache(UrlHelper urlHelper)
         * {
         *      _urlHelper = urlHelper;
         * }*/

        /// <summary>
        /// Clear the cache for this blog post
        /// </summary>
        /// <param name="post">The blog post</param>
        public void ClearCache(PostSummaryModel post)
        {
            ClearCache(_urlHelper.BlogPostAbsolute(post));
            ClearCache(_urlHelper.ActionAbsolute(MVC.Site.Index()));
            ClearCache(_urlHelper.ActionAbsolute(MVC.Blog.Index()));
            // TODO: Clear tags and categories if they're ever cached
        }
예제 #2
0
 public static string ActionAbsolute(this UrlHelper url, string actionName, object routeValues)
 {
     return(url.ActionAbsolute(actionName, null, routeValues));
 }
예제 #3
0
 public static string ActionAbsolute(this UrlHelper url, string actionName, string controllerName)
 {
     return(url.ActionAbsolute(actionName, controllerName, null));
 }