2021-02-18 11:06:02 +01:00
|
|
|
|
// Copyright (c) Umbraco.
|
|
|
|
|
|
// See LICENSE for more details.
|
2020-01-21 13:40:23 +01:00
|
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
|
using Umbraco.Cms.Core.Cache;
|
2020-01-21 13:40:23 +01:00
|
|
|
|
|
2021-02-18 11:06:02 +01:00
|
|
|
|
namespace Umbraco.Extensions
|
|
|
|
|
|
{
|
2020-01-21 13:40:23 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Extension methods for the cache helper
|
|
|
|
|
|
/// </summary>
|
2021-02-18 11:06:02 +01:00
|
|
|
|
public static class CoreCacheHelperExtensions
|
2020-01-21 13:40:23 +01:00
|
|
|
|
{
|
|
|
|
|
|
public const string PartialViewCacheKey = "Umbraco.Web.PartialViewCacheKey";
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Clears the cache for partial views
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="appCaches"></param>
|
|
|
|
|
|
public static void ClearPartialViewCache(this AppCaches appCaches)
|
|
|
|
|
|
{
|
|
|
|
|
|
appCaches.RuntimeCache.ClearByKey(PartialViewCacheKey);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|