@@ -9,7 +9,6 @@ import { Closeable } from '../utils/Closeable';
99import { AwsRegion , getRegion } from '../utils/Region' ;
1010import { CombinedSchemas } from './CombinedSchemas' ;
1111import { GetSchemaTaskManager } from './GetSchemaTaskManager' ;
12- import { PrivateSchemasType } from './PrivateSchemas' ;
1312import { RegionalSchemasType , SchemaFileType } from './RegionalSchemas' ;
1413import { SamSchemasType , SamStoreKey } from './SamSchemas' ;
1514import { SchemaStore } from './SchemaStore' ;
@@ -99,9 +98,7 @@ export class SchemaRetriever implements SettingsConfigurable, Closeable {
9998 @Measure ( { name : 'getSchemas' } )
10099 get ( region : AwsRegion , profile : string ) : CombinedSchemas {
101100 // Check if combined schemas are already cached first
102- const cacheKey = `${ region } :${ profile } ` ;
103- const cachedCombined = this . schemaStore . combinedSchemas . get < CombinedSchemas > ( cacheKey ) ;
104-
101+ const cachedCombined = this . schemaStore . get ( region , profile ) ;
105102 if ( cachedCombined ) {
106103 return cachedCombined ;
107104 }
@@ -114,25 +111,14 @@ export class SchemaRetriever implements SettingsConfigurable, Closeable {
114111 this . schemaTaskManager . addTask ( region ) ;
115112 }
116113
117- // Create and cache combined schemas
118- const privateSchemas = this . schemaStore . privateSchemas . get < PrivateSchemasType > ( profile ) ;
119- const samSchemas = this . schemaStore . samSchemas . get < SamSchemasType > ( SamStoreKey ) ;
120- const combinedSchemas = CombinedSchemas . from ( regionalSchemas , privateSchemas , samSchemas ) ;
121-
122- void this . schemaStore . combinedSchemas . put ( cacheKey , combinedSchemas ) ;
123- return combinedSchemas ;
114+ return this . schemaStore . put ( region , profile , regionalSchemas ) ;
124115 }
125116
126117 updatePrivateSchemas ( ) {
127118 this . schemaStore . invalidateCombinedSchemas ( ) ;
128119 this . schemaTaskManager . runPrivateTask ( ) ;
129120 }
130121
131- // Method to invalidate cache when any schemas are updated
132- invalidateCache ( ) {
133- this . schemaStore . invalidateCombinedSchemas ( ) ;
134- }
135-
136122 // Proactively rebuild combined schemas to avoid lazy loading delays
137123 @Measure ( { name : 'rebuildCurrentSchemas' } )
138124 rebuildForCurrentSettings ( ) {
0 commit comments