Open sandboxFocusImprove this doc

LAMA5109: The method invalidates a cached method

Severity Info
Reported by Metalama.Patterns.Caching
Message This method invalidates <CachedMethod>.

Cause

When you apply the InvalidateCacheAttribute aspect to a method, this method removes the results of one or more methods cached with the CacheAttribute aspect from the cache. LAMA5109 is designed to annotate the invalidating method with the name of the cached method it invalidates, <CachedMethod>, so that you can navigate between the two methods in the IDE. Its counterpart, LAMA5108, annotates the cached method.

The current version of Metalama.Patterns.Caching defines this diagnostic but doesn't report it: the code that produces this annotation is disabled until Metalama supports this kind of annotation. Because Metalama never reports this diagnostic, the article has no example.

Resolution

No action is required. LAMA5109 is informational and doesn't indicate a problem.

The methods that an [InvalidateCache] method invalidates are the ones named in the arguments of its attribute.

See also