/// <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()); }
/// <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); }
/// <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()); }