enyim

Unable to get Enyim.Caching MemcachedClient to work with Couchbase

不问归期 提交于 2019-12-11 19:27:51
问题 I realize that Couchbase provides a client to their memcached server, but I'm trying to get the enyim.caching client to work. Here's my trivial c# code that uses the Couchbase client (which works) and then pretty much the same thing with the enyim MemcachedClient: class Program { static void Main(string[] args) { var client = new CouchbaseClient(); client.Store(StoreMode.Set, "somekey", "somevalue"); var somevalue = client.Get<string>("somekey"); Console.WriteLine(somevalue); Console.ReadLine

How can I change default Couchbase item size?

本小妞迷上赌 提交于 2019-12-11 01:19:35
问题 I am using the .NET Couchbase Client API that includes Enyim.Caching. I have a DataTable that is approximately 55 megs and it is not getting cached. I understand that there is a "soft" max for the item size of 20 megs. How can I change the default max item size in order to cache this object? 回答1: Are you using a Memcached bucket or Couchbase bucket? If you're using a Memcached bucket then you're likely hitting the 1MB limit. A quick sample program: var config = new

Cant get the couchbase .net memcache client to run, complains it's strong name validation failed

徘徊边缘 提交于 2019-12-08 02:39:47
问题 The error: Could not load file or assembly 'Enyim.Caching, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cec98615db04012e' or one of its dependencies This is on server 2008, I tried disabling the strong name validation, but the instructions are totally wrong for server, and I dont' really trust this anyhow, how will I get it to work on the prod server. Wild frustrating.. The server is up and happily running, but I can't get any memcache client to actually work.. I assume someone, somewhere

Is it possible to get/search Memcached keys by a prefix?

眉间皱痕 提交于 2019-11-30 11:31:38
I'm writing to memcached a lot of key/value -> PREFIX_KEY1, PREFIX_KEY2, PREFIX_KEY3 I need to get all the keys that starts with PREFIX_ Is it possible? btilly Sorry, but no. Memcached uses a hashing algorithm that distributes keys at apparently random places, and so those keys are scattered all over. You'd have to scan everything to find them. Also you should be aware that, by design, memcached can drop any any key at any time for any reason. If you're putting stuff in, you should be aware that you can't depend on it coming back out. This is absolutely fine for its original use case, a cache

Is it possible to get/search Memcached keys by a prefix?

痞子三分冷 提交于 2019-11-29 17:07:18
问题 I'm writing to memcached a lot of key/value -> PREFIX_KEY1, PREFIX_KEY2, PREFIX_KEY3 I need to get all the keys that starts with PREFIX_ Is it possible? 回答1: Sorry, but no. Memcached uses a hashing algorithm that distributes keys at apparently random places, and so those keys are scattered all over. You'd have to scan everything to find them. Also you should be aware that, by design, memcached can drop any any key at any time for any reason. If you're putting stuff in, you should be aware

Enyim Memcached client doesn't work with expiration parameter passed

扶醉桌前 提交于 2019-11-28 08:47:24
问题 when using Enyim memcached client to store data with a expire timespan, i find that it doesn't work. Could anyone help? In my test code, I store the date with 10 minutes expiration time, and i try to get it from cache immediately but got a null object. Enyim.Caching.MemcachedClient client = new Enyim.Caching.MemcachedClient(); client.Store(Enyim.Caching.Memcached.StoreMode.Set, "one", 1, new TimeSpan(0, 10, 0)); object obj; client.TryGet("one", out obj); // obj == null Assert.AreNotEqual(null