Is there a tutoiral or some working example code for caching? I tried finding something but couldn't see any good examples. 

Most of the time its just bits and pieces. 

Nov 02, 2017 8:52

not sure, what are you looking for, but if you want to use ISynchronizedObjectInstanceCache cache, this is how you can do

//ISynchronizedObjectInstanceCache _synchronizedObjectInstanceCache injected in constructor

var cacheKey = $"YOURCACHEKEY";
var cacheValue = _synchronizedObjectInstanceCache.Get(cacheKey) as YourModel;
if (cacheValue != null)
return cacheValue;

var yourModel = GetYourModel();
_synchronizedObjectInstanceCache.Insert(cacheKey, yourModel, Global.AbsoluteCacheEvictionPolicy_Short);

Nov 02, 2017 10:24

Thanks Khan for the response. 

Which constructor am I going to inject //ISynchronizedObjectInstanceCache _synchronizedObjectInstanceCache?

Where am I getting the cache key? 

That is what I was saying that I couldn't find any proper tutorial. 

Nov 02, 2017 10:30

Thanks for the response Khan. 

What I don't get is which constructor should I pass this ISynchronizedObjectInstanceCache _synchronizedObjectInstanceCache into?

Also, how do I configure the cache server? I mean don't I have to set somewhere cache urls for local server and remote server etc?

Nov 02, 2017 10:33

Google is my friend,

Nov 02, 2017 10:43

Thanks but I have looked into this and couldn't find the proper solution maybe I am missing something. But thanks anyway I will keep looking. 

Nov 02, 2017 10:45
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.