Ejemplo n.º 1
0
 /// <summary>
 /// Adds the navigation menu HTML to the cache.
 /// </summary>
 /// <param name="html">The menu's HTML.</param>
 public void AddMenu(string html)
 {
     _cache.Add(CacheKeys.MenuKey(), html, new CacheItemPolicy());
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Retrieves the navigation menu HTML from the cache, or null if it doesn't exist.
 /// </summary>
 /// <returns>The cache HTML for the menu.</returns>
 public string GetMenu()
 {
     return(_cache.Get(CacheKeys.MenuKey()) as string);
 }
Ejemplo n.º 3
0
 /// <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());
 }