I am trying to use SpatialFocus.MethodCache but with a static method rather than in an instance of a class. I am getting an error:
1>MSBUILD : warning : Fody/SpatialFocus.MethodCache: Class Test contains [Cache] attribute but does not contain a single property implementing IMemoryCache interface
Has anyone had success making this work?
<code>public class Test
{
static protected IMemoryCache MemoryCache { get; }
[Cache]
static string Test()
{
return "hello";
}
}
</code>
<code>public class Test
{
static protected IMemoryCache MemoryCache { get; }
[Cache]
static string Test()
{
return "hello";
}
}
</code>
public class Test
{
static protected IMemoryCache MemoryCache { get; }
[Cache]
static string Test()
{
return "hello";
}
}