从protobuf-net到enyim缓存的转码器是否已弃用? distributed caching with protobuff-net

当我尝试启动MemcachedClient()时,像这样app.config一样设置我的Enyim配置会导致错误。
使用相同


transcoder type =“ ProtoBuf.Caching.Enyim.NetTranscoder” /


System.TypeInitializationException was unhandled by user code
HResult=-2146233036
Message=The type initializer for 'Enyim.Caching.MemcachedClient' threw an exception.
Source=Enyim.Caching
TypeName=Enyim.Caching.MemcachedClient
StackTrace:
   at Enyim.Caching.MemcachedClient..ctor()
   at Global.asax.cs:line 31
InnerException: System.Configuration.ConfigurationErrorsException
   HResult=-2146232062
   Message=The value of the property 'transcoder' cannot be parsed. The error is: Object reference   not set to an instance of an object. (\web.config line 207)
   Source=System.Configuration
   BareMessage=The value of the property 'transcoder' cannot be parsed. The error is: Object reference not set to an instance of an object.
   StackTrace:
        at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)
        at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
        at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
        at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
        at System.Web.HttpContext.GetSection(String sectionName)
        at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
        at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
        at System.Configuration.ConfigurationManager.GetSection(String sectionName)
        at Enyim.Caching.MemcachedClient..cctor() in MemcachedClient.cs:line 25
   InnerException:


两者都通过nuget安装并使用了可用的最新版本。

最佳答案

是的(咳嗽),当然在那里!只需查看“ protobuf-net.Enyim”即可,即


PM>安装包protobuf-net.Enyim


(或使用GUI客户端)

要初始化,您需要将代码转换器配置为ProtoBuf.Caching.Enyim.NetTranscoder的实例(按照原始说明)。如果通过配置执行此操作,请注意,此类型的程序集现在为protobuf-net.Enyim。如果我假设配置文件使用标准符号,则意味着您需要指定(在配置中):

<transcoder type="ProtoBuf.Caching.Enyim.NetTranscoder,protobuf-net.Enyim" />




原始答案:

enyim代码转换器当前不在nuget中;但是-现在,我将自己复活,通过添加一个单独的NuGet软件包(引用EnyimMemcached和protobuf-net)将其重新添加。

随机问题...是否有机会向我指出二进制memcached下载进行测试?

出现这种情况的原因之一是,当我第一次编写enyim转码器时,memcached是一个简单的“运行此程序”-但是上次我看到它已经全部消失了,并且无法找到一个简单的程序包内存缓存服务器。如果您可以告诉我现在的位置,我将在本周末开始工作。

10-02 07:16