/// <summary> /// Clears the caches. /// </summary> private void ClearCaches( ) { if ((CachesToClear & Caches.EntityCache) == Caches.EntityCache) { EntityCache.Instance.Clear( ); } if ((CachesToClear & Caches.EntityCache) == Caches.EntityFieldCache) { EntityFieldCache.Instance.Clear( ); } if ((CachesToClear & Caches.EntityCache) == Caches.EntityRelationshipCache) { EntityRelationshipCache.Instance.Clear( ); } if ((CachesToClear & Caches.BulkResultCache) == Caches.BulkResultCache) { using (new TenantAdministratorContext(RunAsDefaultTenant.DefaultTenantName)) { BulkResultCache.Clear( ); } } }
public void CleanPreload( ) { BulkResultCache.Clear( ); BulkSqlQueryCache.Clear( ); using (new SecurityBypassContext( )) { BulkPreloader.TenantWarmup( ); } }