Try our conversational search powered by Generative AI!

RuntimeCacheInsert vs. RuntimeCacheAdd

Vote:
 
What is the difference between the methods RuntimeCacheInsert and RuntimeCacheAdd in CacheManager? They seem to be used interchangeably?
#33916
Oct 22, 2009 10:44
Vote:
 

Nevermind, of course the Insert method replaces an existing item with the same key while the Add method only caches the item if there isn't already an item with the same key.

But will Insert cause a purge of dependent items, like if I did a remove followed by Add, or is the insert method there to avoid this? I'm looking for a way to cache an item without expiration, but upon a certain event I want to change the expiration for that item so that it (and items dependent on it) expires in a few minutes (rather than expiring it right away by using remove). Can this be done?

#33918
Oct 22, 2009 10:56
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.