Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: clean up unused methods in store package (#18292)
Danny Xu0ea3b4cb5119
diff --git a/backend/store/setting.go b/backend/store/setting.goindex 95864d6109..cbdf386b8e 100644--- a/backend/store/setting.go+++ b/backend/store/setting.go@@ -142,20 +142,6 @@ func (s *Store) GetDataClassificationSetting(ctx context.Context) (*storepb.Datareturn payload, nil}-// GetDataClassificationConfigByID gets the classification config by the id.-func (s *Store) GetDataClassificationConfigByID(ctx context.Context, classificationConfigID string) (*storepb.DataClassificationSetting_DataClassificationConfig, error) {- setting, err := s.GetDataClassificationSetting(ctx)- if err != nil {- return nil, err- }- for _, config := range setting.Configs {- if config.Id == classificationConfigID {- return config, nil- }- }- return &storepb.DataClassificationSetting_DataClassificationConfig{}, nil-}-func (s *Store) GetAISetting(ctx context.Context) (*storepb.AISetting, error) {aiSetting := &storepb.AISetting{}setting, err := s.GetSettingV2(ctx, storepb.SettingName_AI)@@ -188,14 +174,6 @@ func (s *Store) GetEnvironmentSetting(ctx context.Context) (*storepb.Environmentreturn envSetting, nil}-// DeleteCache deletes the cache.-func (s *Store) DeleteCache() {- s.settingCache.Purge()- s.policyCache.Purge()- s.userEmailCache.Purge()- s.userIDCache.Purge()-}-// GetSettingV2 returns the setting by name.func (s *Store) GetSettingV2(ctx context.Context, name storepb.SettingName) (*SettingMessage, error) {if v, ok := s.settingCache.Get(name); ok && s.enableCache {diff --git a/backend/store/store.go b/backend/store/store.goindex 7b1ac89d62..f025bec3e6 100644--- a/backend/store/store.go+++ b/backend/store/store.go@@ -154,6 +154,14 @@ func (s *Store) GetDB() *sql.DB {return s.dbConnManager.GetDB()}+// DeleteCache deletes the cache.+func (s *Store) DeleteCache() {+ s.settingCache.Purge()+ s.policyCache.Purge()+ s.userEmailCache.Purge()+ s.userIDCache.Purge()+}+func getInstanceCacheKey(instanceID string) string {return instanceID}