Interface IStructureMetadataCache
Specialized cache for field structures.
Fast access to structure metadata by scheme, ID and type.
public interface IStructureMetadataCache
Methods
GetAllCachedStructures()
Get all cached structures (for diagnostics).
Dictionary<long, RedbStructure> GetAllCachedStructures()
GetSchemeToStructuresMap()
Get scheme to structures map (for diagnostics).
Dictionary<long, List<RedbStructure>> GetSchemeToStructuresMap()
GetStructureByIdAsync(long)
Get structure by ID.
Task<RedbStructure?> GetStructureByIdAsync(long structureId)
GetStructureByNameAsync(long, string)
Get structure by name within scheme.
Task<RedbStructure?> GetStructureByNameAsync(long schemeId, string structureName)
GetStructuresBySchemeIdAsync(long)
Get all structures for scheme (most common case).
Task<List<RedbStructure>> GetStructuresBySchemeIdAsync(long schemeId)
GetStructuresByTypeAsync(Type)
Get structures for .NET type.
Task<List<RedbStructure>> GetStructuresByTypeAsync(Type type)
GetStructuresByTypeAsync<TProps>()
Get structures for .NET type.
Task<List<RedbStructure>> GetStructuresByTypeAsync<TProps>() where TProps : class
GetStructuresMapBySchemeIdAsync(long)
Get name -> structure map for scheme (optimization for frequent lookups).
Task<Dictionary<string, RedbStructure>> GetStructuresMapBySchemeIdAsync(long schemeId)
InvalidateStructure(long)
Remove structure from cache by ID.
void InvalidateStructure(long structureId)
InvalidateStructuresForScheme(long)
Remove all structures for scheme from cache.
void InvalidateStructuresForScheme(long schemeId)
InvalidateStructuresForType(Type)
Remove structures for type from cache.
void InvalidateStructuresForType(Type type)
InvalidateStructuresForType<TProps>()
Remove structures for type from cache.
void InvalidateStructuresForType<TProps>() where TProps : class
SetStructure(RedbStructure)
Add or update structure in cache.
void SetStructure(RedbStructure structure)
SetStructuresForScheme(long, List<RedbStructure>)
Add or update all structures for scheme in cache.
void SetStructuresForScheme(long schemeId, List<RedbStructure> structures)
SetStructuresForType(Type, List<RedbStructure>)
Add or update structures for type in cache.
void SetStructuresForType(Type type, List<RedbStructure> structures)
SetStructuresForType<TProps>(List<RedbStructure>)
Add or update structures for type in cache.
void SetStructuresForType<TProps>(List<RedbStructure> structures) where TProps : class