using System; using System.Collections.Generic; using System.Linq; using System.Text; using Providers = CacheProviders.Interfaces; using NorthScale; using NorthScale.Store; using NorthScale.Store.Configuration; namespace CacheProviders.NorthScaleMemcached { public class NorthscaleProvider : Providers.ICache { private readonly Uri _cacheBaseURI = null; private readonly NorthScaleClient _memCachedClient = null; public NorthscaleProvider() { _cacheBaseURI = new Uri("http://localhost:8080/pools/default"); _memCachedClient = new NorthScaleClient("default"); } bool Providers.ICache.SetItem(string key, object value) { bool _stored = _memCachedClient.Store(Enyim.Caching.Memcached.StoreMode.Set, key, value); return _stored; } object Providers.ICache.GetItem(string key) { object _value = _memCachedClient.Get(key); return _value; } bool Providers.ICache.RemoveItem(string key) { bool _removed = _memCachedClient.Remove(key); return _removed; } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)