Skip to content

Commit

Permalink
check cahche
Browse files Browse the repository at this point in the history
  • Loading branch information
wistefan committed Jan 22, 2025
1 parent 9f88a93 commit 0bf8875
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tir/tirClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (tc TirHttpClient) IsTrustedParticipant(tirEndpoints []string, did string)

func (tc TirHttpClient) GetTrustedIssuer(tirEndpoints []string, did string) (exists bool, trustedIssuer TrustedIssuer, err error) {
for _, tirEndpoint := range tirEndpoints {
trustedIssuer, hit := tc.tilCache.Get(tirEndpoint + did)
trustedIssuer, hit := common.GlobalCache.IssuerCache.Get(tirEndpoint + did)
if !hit {
resp, err := tc.requestIssuer(tirEndpoint, did)
if err != nil {
Expand All @@ -136,7 +136,7 @@ func (tc TirHttpClient) GetTrustedIssuer(tirEndpoints []string, did string) (exi
continue
}
logging.Log().Debugf("Got issuer %s.", logging.PrettyPrintObject(trustedIssuer))
tc.tilCache.Set(tirEndpoint+did, trustedIssuer, cache.DefaultExpiration)
common.GlobalCache.IssuerCache.Set(tirEndpoint+did, trustedIssuer, cache.DefaultExpiration)
}
return true, trustedIssuer.(TrustedIssuer), err

Expand Down

0 comments on commit 0bf8875

Please sign in to comment.