When I start to using NCache open source version, I have using NCache API to store the object value. During the POC, when I add object into NCache, it always throws an "Object reference not set to an instance of an object." error message. And I am sure the object is not null. Below is the sample code:
/** For testing only */
Cache cache = null;
try {
cache = NCache.InitializeCache("mycache");
} catch (Exception ex) {
}
response = ....
CacheItem cacheItem = new CacheItem(response);
cache.Add("testNCache", cacheItem);