/// <summary> /// Clears all the serialized and compressed caches set /// by the 'Resolve' method for the cacheKey provided. /// The default ICacheClient registered in the AppHost will be used. /// </summary> /// <param name="requestContext">The request context.</param> /// <param name="cacheKeys">The cache keys.</param> public static void RemoveFromCache( this IRequestContext requestContext, params string[] cacheKeys) { var cacheClient = GetDefaultCacheClient(); ContentCacheManager.Clear(cacheClient, cacheKeys); }
public void Clear_after_Resolve_with_MimeType_clears_all_cached_results() { ContentCacheManager.Resolve( () => model, serializationContext, cacheClient, CacheKey, null); ContentCacheManager.Clear(cacheClient, CacheKey); AssertEmptyCache(cacheClient, CacheKey); }
public void Clear_after_Resolve_with_MimeType_and_CompressionType_clears_all_cached_results() { ContentCacheManager.Resolve( () => model, MimeTypes.Xml, CompressionTypes.Deflate, cacheClient, CacheKey, null); ContentCacheManager.Clear(cacheClient, CacheKey); AssertEmptyCache(cacheClient, CacheKey); }
public void Clear_after_Resolve_with_MimeType_and_CompressionType_clears_all_cached_results() { var serializationContext = new SerializationContext(MimeTypes.Xml) { CompressionType = CompressionTypes.Deflate }; ContentCacheManager.Resolve( () => model, serializationContext, cacheClient, CacheKey, null); ContentCacheManager.Clear(cacheClient, CacheKey); AssertEmptyCache(cacheClient, CacheKey); }
/// <summary> /// Clears all the serialized and compressed caches set /// by the 'Resolve' method for the cacheKey provided /// </summary> /// <param name="requestContext"></param> /// <param name="cacheClient"></param> /// <param name="cacheKeys"></param> public static void RemoveFromCache( this IRequestContext requestContext, ICacheClient cacheClient, params string[] cacheKeys) { ContentCacheManager.Clear(cacheClient, cacheKeys); }