ASP.NET cache add vs insert

Viewed 24705

What is the difference between the Cache.Add() and Cache.Insert() methods?

In which situations should I use each one?

3 Answers

Cache.Add() also returns a cached object from Cache after it was added:

string cachedItem = Cache.Add("cachedItem", ....);
Related