public void ClearRepositoryCache(string repositoryId) { CheckSession(); if (repositoryId == null) { return; } session.Lock(); try { RepositoryInfoCache repInfoCache = session.GetRepositoryInfoCache(); repInfoCache.Remove(repositoryId); TypeDefinitionCache typeDefCache = session.GetTypeDefinitionCache(); typeDefCache.Remove(repositoryId); ICmisSpi spi = GetSpi(); spi.ClearRepositoryCache(repositoryId); } finally { session.Unlock(); } }
public ITypeDefinitionList GetTypeChildren(string repositoryId, string typeId, bool?includePropertyDefinitions, long?maxItems, long?skipCount, IExtensionsData extension) { ITypeDefinitionList result = null; bool hasExtension = (extension != null) && (extension.Extensions != null) && (extension.Extensions.Count > 0); // get the SPI and fetch the type definitions ICmisSpi spi = session.GetSpi(); result = spi.GetRepositoryService().GetTypeChildren(repositoryId, typeId, includePropertyDefinitions, maxItems, skipCount, extension); // put it into the cache if (!hasExtension && (includePropertyDefinitions ?? false) && (result != null) && (result.List != null)) { TypeDefinitionCache cache = session.GetTypeDefinitionCache(); foreach (ITypeDefinition tdd in result.List) { cache.Put(repositoryId, tdd); } } return(result); }