public override void Insert(string CacheKey, object objObject, bool PersistAppRestart) { if (PersistAppRestart) { //remove the cache key which //will remove the serialized //file before creating a new one Remove(CacheKey); } Controller c = new Controller(); if (PersistAppRestart && DataCache.CachePersistenceEnabled) { c.AddCachedObject(CacheKey, objObject, Globals.ServerName); c.AddBroadcast("RemoveCachedItem", CacheKey, Globals.ServerName); } else if (Globals.WebFarmEnabled) { c.AddBroadcast("RemoveCachedItem", CacheKey, Globals.ServerName); } objCache.Insert(CacheKey, objObject); }
public override void Insert(string CacheKey, object objObject, CacheDependency objDependency, DateTime AbsoluteExpiration, TimeSpan SlidingExpiration, CacheItemPriority Priority, CacheItemRemovedCallback OnRemoveCallback, bool PersistAppRestart) { if (PersistAppRestart) { //remove the cache key which //will remove the serialized //file before creating a new one Remove(CacheKey); } Controller c = new Controller(); if (PersistAppRestart && DataCache.CachePersistenceEnabled) { c.AddCachedObject(CacheKey, objObject, Globals.ServerName); c.AddBroadcast("RemoveCachedItem", CacheKey, Globals.ServerName); } else if (Globals.WebFarmEnabled) { c.AddBroadcast("RemoveCachedItem", CacheKey, Globals.ServerName); } objCache.Insert(CacheKey, objObject, objDependency, AbsoluteExpiration, SlidingExpiration, Priority, OnRemoveCallback); }
public override void Insert( string CacheKey, object objObject, bool PersistAppRestart ) { if( PersistAppRestart ) { //remove the cache key which //will remove the serialized //file before creating a new one Remove( CacheKey ); } Controller c = new Controller(); if( PersistAppRestart && DataCache.CachePersistenceEnabled ) { c.AddCachedObject( CacheKey, objObject, Globals.ServerName ); c.AddBroadcast( "RemoveCachedItem", CacheKey, Globals.ServerName ); } else if( Globals.WebFarmEnabled ) { c.AddBroadcast( "RemoveCachedItem", CacheKey, Globals.ServerName ); } objCache.Insert( CacheKey, objObject ); }
public override void Insert( string CacheKey, object objObject, CacheDependency objDependency, DateTime AbsoluteExpiration, TimeSpan SlidingExpiration, CacheItemPriority Priority, CacheItemRemovedCallback OnRemoveCallback, bool PersistAppRestart ) { if( PersistAppRestart ) { //remove the cache key which //will remove the serialized //file before creating a new one Remove( CacheKey ); } Controller c = new Controller(); if( PersistAppRestart && DataCache.CachePersistenceEnabled ) { c.AddCachedObject( CacheKey, objObject, Globals.ServerName ); c.AddBroadcast( "RemoveCachedItem", CacheKey, Globals.ServerName ); } else if( Globals.WebFarmEnabled ) { c.AddBroadcast( "RemoveCachedItem", CacheKey, Globals.ServerName ); } objCache.Insert( CacheKey, objObject, objDependency, AbsoluteExpiration, SlidingExpiration, Priority, OnRemoveCallback ); }