备用DataCache实现 [英] Alternative DataCache Implementations

查看:49
本文介绍了备用DataCache实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看起来DataCache类是一个抽象。  当进一步挖掘使用邪恶的"内部"时,关键词似乎在课堂上广泛传播。  我想创建一个AspNetDataCache实现,我可以在开发机器上返回
而不是实时AppFabric对象,但由于设计的原因,这似乎是不可能的。  看起来团队已经走了与ASP.NET运行团队最初做的相同的道路,没有利用接口或考虑可交换的
实现。   vNext中是否有任何计划为公共DataCache方法创建接口?

解决方案

您好Colin


截至今天,这不受支持。你可以通过在DataCache对象上写一个包装器来实现预期吗?您还可以在这里详细说明具体要求吗?感谢


It appears the DataCache class is an abstract.  When digging in a bit further the use of the evil "internal" keyword seems to be wide spread through out the class.  I was looking to create an AspNetDataCache implementation that I could return on development machines instead of the live AppFabric object but that appears impossible because of the design.  It seems the team has gone down the same path the ASP.NET runtime team did at first by not leveraging interfaces or thinking about swappable implementations.  Is there any plan in vNext to create an interface for the public DataCache methods?

解决方案

Hi Colin

This is not supported as of today. Can you not achieve the expected by writing a wrapper over the DataCache object? Can you also detail a little on the exact requirement here? Thanks


这篇关于备用DataCache实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆