コード例 #1
0
ファイル: SiteCache.cs プロジェクト: tcordell8891/roadkill
 /// <summary>
 /// Adds the admin menu HTML to the cache.
 /// </summary>
 /// <param name="html">The menu's HTML.</param>
 public void AddAdminMenu(string html)
 {
     _cache.Add(CacheKeys.AdminMenuKey(), html, new CacheItemPolicy());
 }
コード例 #2
0
ファイル: SiteCache.cs プロジェクト: tcordell8891/roadkill
 /// <summary>
 /// Retrieves the admin menu HTML from the cache, or null if it doesn't exist.
 /// </summary>
 /// <returns>The cache HTML for the admin menu.</returns>
 public string GetAdminMenu()
 {
     return(_cache.Get(CacheKeys.AdminMenuKey()) as string);
 }
コード例 #3
0
ファイル: SiteCache.cs プロジェクト: tcordell8891/roadkill
 /// <summary>
 /// Removes all cached HTML for the navigation menus from the cache.
 /// </summary>
 public void RemoveMenuCacheItems()
 {
     _cache.Remove(CacheKeys.MenuKey());
     _cache.Remove(CacheKeys.LoggedInMenuKey());
     _cache.Remove(CacheKeys.AdminMenuKey());
 }