// try to get it from the ASP.NET cache
string fileKey = CacheInternal.PrefixAdRotator + ((!String.IsNullOrEmpty(physicalPath)) ?
physicalPath : virtualPath.VirtualPathString);
- CacheInternal cacheInternal = System.Web.HttpRuntime.CacheInternal;
- AdRec [] adRecs = cacheInternal[fileKey] as AdRec[];
+ CacheStoreProvider cacheInternal = System.Web.HttpRuntime.Cache.InternalCache;
+ AdRec[] adRecs = cacheInternal.Get(fileKey) as AdRec[];
if (adRecs == null) {
// Otherwise load it
if (dependency != null) {
using (dependency) {
// and store it in the cache, dependent on the file name
- cacheInternal.UtcInsert(fileKey, adRecs, dependency);
+ cacheInternal.Insert(fileKey, adRecs, new CacheInsertOptions() { Dependencies = dependency });
}
}
}