Giter Club home page Giter Club logo

Comments (4)

cnblogs-dudu avatar cnblogs-dudu commented on June 29, 2024

Please provide sample codes that reproduce this issue.

from enyimmemcachedcore.

sometime avatar sometime commented on June 29, 2024
    public class CacheLayer
    {
        readonly IMemcachedClient _memcachedClient;
        public CacheProvider(IMemcachedClient memcachedClient)
        {
            _memcachedClient = memcachedClient;
        }
        public Type Get<Type>(string key)
        {
            return _memcachedClient.Get<Type>(key);
        }

        public IDictionary<string, object> Get(IEnumerable<string> keys)
        {
            return _memcachedClient.Get(keys);
        }

        public void Set(string key, object value)
        {
            _memcachedClient.Store(StoreMode.Set, key, value);
        }
    }

in my code

var key1 = "test-key-1";
var key2 = "test-key-2"
var obj1 = new HashSet<int> { 1, 2 };
var obj2 = new HashSet<int> { 3, 4 };
cacheLayer.Set(key1, obj1);
cacheLayer.Set(key2, obj2);

var multiResult = cacheLayer.Get(new string [] { key1, key2 }); // multiResult is empty dictionary !!!

var result1 = cacheLayer.Get<HashSet<int>>(key1); // success return obj1
var result2 = cacheLayer.Get<HashSet<int>>(key2); // success return obj2

multiResult - every time is empty dictionary, but result1 and result2 - success return obj1 and obj2 values

from enyimmemcachedcore.

sometime avatar sometime commented on June 29, 2024

up

from enyimmemcachedcore.

cnblogs-dudu avatar cnblogs-dudu commented on June 29, 2024

Fixed in EnyimMemcachedCore 2.1.0. Please use cacheLayer.Get<HashSet<int>> or cacheLayer.GetAsync<HashSet<int>>.

from enyimmemcachedcore.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.