MethodCache.Fody icon indicating copy to clipboard operation
MethodCache.Fody copied to clipboard

Support excluding parameters from key creation

Open pergerch opened this issue 5 years ago • 0 comments

Implement a [NoKey] attribute (or similar), that excludes the respective parameter from key creating. This is suitable for parameters that do not alter the outcome of the cached method and will improve the cache efficiency.

Code sample:

[Cache]
public class BasicSample
{
    // ...

    public int Add(int a, int b, [NoKey] int c)
    {
        return a + b;
    }
}

pergerch avatar Nov 06 '20 13:11 pergerch