コード例 #1
0
ファイル: SiteCache.cs プロジェクト: tcordell8891/roadkill
 /// <summary>
 /// Adds the navigation menu HTML for logged in users to the cache.
 /// </summary>
 /// <param name="html">The menu's HTML.</param>
 public void AddLoggedInMenu(string html)
 {
     _cache.Add(CacheKeys.LoggedInMenuKey(), html, new CacheItemPolicy());
 }
コード例 #2
0
ファイル: SiteCache.cs プロジェクト: tcordell8891/roadkill
 /// <summary>
 /// Retrieves the navigation menu HTML for logged in users from the cache, or null if it doesn't exist.
 /// </summary>
 /// <returns>The cache HTML for the menu.</returns>
 public string GetLoggedInMenu()
 {
     return(_cache.Get(CacheKeys.LoggedInMenuKey()) 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());
 }