Files
Umbraco-CMS/src/Umbraco.Web/Cache/MediaLibraryRefreshers.cs
Shannon Deminick 84bd89f00b Adds a constant id for the media distributed cache object,
adds extension method to DistrubutedCache to refresh the media cache,
Changes all distrubuted cache calls for media to use extension method.
2013-02-07 04:01:50 +06:00

38 lines
775 B
C#

using System;
using Umbraco.Core;
using umbraco.interfaces;
namespace Umbraco.Web.Cache
{
public class MediaLibraryRefreshers : ICacheRefresher
{
public Guid UniqueIdentifier
{
get { return new Guid(DistributedCache.MediaCacheRefresherId); }
}
public string Name
{
get { return "Clears Media Cache from umbraco.library"; }
}
public void RefreshAll()
{
}
public void Refresh(int id)
{
ApplicationContext.Current.ApplicationCache.ClearLibraryCacheForMedia(id, false);
}
public void Remove(int id)
{
}
public void Refresh(Guid id)
{
}
}
}