我試圖使用南希插件Nancy.LightningCache
Nancy.LightningCache - 拋出時AsCachable()被調用
按照docs我應該能夠建立我的緩存很容易,這樣的例外:
引導程序
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
{
base.ApplicationStartup(container, pipelines);
this.EnableLightningCache(
container.Resolve<IRouteResolver>(),
ApplicationPipelines,
new[] {"id", "claim", "query", "take", "skip"});
}
路線
Get["/profile"] = _ =>
View["UserProfileView", Model].AsCacheable(DateTime.Now.AddSeconds(30));
當這條路線被調用時,我得到以下異常。
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException:
'Nancy.Responses.Negotiation.Negotiator' does not contain a definition for 'AsCacheable'
任何想法?