// It will invalidate the memory cache and all the dynamic caches which have been tagged. public async Task InvalidateCachedDateTimeAsync() { // As mentioned ISignal service is used to invalidate the memory cache. _signal.SignalToken(MemoryCacheKey); // ITagCache.RemoveTagAsync will invalidate all the dynamic caches which are tagged with the given tag. await _tagCache.RemoveTagAsync(DynamicCacheTag); }
public override Task PublishedAsync(PublishContentContext context, AliasPart instance) { return(_tagCache.RemoveTagAsync($"alias:{instance.Alias}")); }
public override Task PublishedAsync(PublishContentContext context) { return(_tagCache.RemoveTagAsync($"contentitemid:{context.ContentItem.ContentItemId}")); }
private Task RemoveTagAsync(AutoroutePart part) { return(_tagCache.RemoveTagAsync($"alias:{part.Path}")); }
public async Task <ActionResult> Tag(string tag) { await _tagCache.RemoveTagAsync(tag); return(RedirectToAction("Tag", "Home", new { area = "OrchardCore.Demo" })); }