Exemple #1
0
        public string Get(string key)
        {
            int hash = CalculateDatabaseId.Get(key);

            Console.WriteLine("Database: " + hash + ", contextId: " + key);
            IDatabase database = _connection.GetDatabase(hash);

            return(database.StringGet(key));
        }
Exemple #2
0
        public void Add(KeyValuePair <string, string> item)
        {
            int hash = CalculateDatabaseId.Get(item.Key);

            Console.WriteLine("Database: " + hash + ", contextId: " + item.Key);

            IDatabase database = _connection.GetDatabase(hash);

            database.StringSet(item.Key, item.Value);
        }