protected void ClearEventstoreCache(WindsorContainer container) { if(EventStoreType == typeof(SqlServerEventStore)) { container.ExecuteUnitOfWorkInIsolatedScope(() => ((SqlServerEventStore)container.Resolve<IEventStore>()).ClearCache()); } }