API Reference > ecschema-metadata > Context > SchemaCache SchemaCache Class Beta Implements ISchemaLocater Methods Name Description constructor(): SchemaCache addSchema<T extends Schema<T>>(schema: T): Promise<void> Adds a schema to the cache. addSchemaSync<T extends Schema<T>>(schema: T): void Adds a schema to the cache. getSchema<T extends Schema<T>>(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): Promise<undefined | T> Gets the schema which matches the provided SchemaKey. getSchemaSync<T extends Schema<T>>(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): undefined | T Properties Name Type Description count Accessor ReadOnly number Defined in core/ecschema-metadata/src/Context.ts Line 52 Last Updated: 11 June, 2024