MetalamaAPI documentationPatterns APIMetalama.​Patterns.​CachingCaching­Service­ExtensionsInvalidate­Object
Open sandboxFocus

CachingServiceExtensions.InvalidateObject Method

InvalidateObject(ICachingService, Object)

Invalidates a cache dependency given an Object, i.e. removes all cached items that are dependent on that object. The cache key is generated from the object using the same mechanism as with parameters, i.e. using IFormattable<T>, Formatter<T>, ToString() or ISpanFormattable.

public static void InvalidateObject(this ICachingService cachingService, object dependency)
Type Name Description
ICachingService cachingService

The ICachingService.

Object dependency