Skip to content

Commit

Permalink
Tune caching
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Dec 22, 2024
1 parent dc3c02b commit 4d14f3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/groovy/io/seqera/wave/proxy/ProxyCache.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import jakarta.inject.Singleton
@CompileStatic
class ProxyCache extends AbstractTieredCache<DelegateResponse> {

@Value('${wave.proxy-cache.duration:1h}')
@Value('${wave.proxy-cache.duration:30m}')
private Duration duration

@Value('${wave.proxy-cache.max-size:10000}')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ class TowerClient {
@Value('${wave.pairing.cache.long.duration:24h}')
private Duration cacheLongDuration

@Value('${wave.pairing.cache.long.duration:1h}')
private Duration cacheUserDuration


protected <T> CompletableFuture<T> getAsync(URI uri, String endpoint, @Nullable JwtAuth authorization, Class<T> type) {
assert uri, "Missing uri argument"
Expand All @@ -80,7 +77,7 @@ class TowerClient {
final k = RegHelper.sipHash(uri, authorization.key, null, null)
// NOTE: it assumes the user info metadata does nor change over time
// and therefore the *long* expiration cached is used
get0(uri, towerEndpoint, authorization, UserInfoResponse, k, cacheUserDuration) as UserInfoResponse
get0(uri, towerEndpoint, authorization, UserInfoResponse, k, cacheLongDuration) as UserInfoResponse
}

ListCredentialsResponse listCredentials(String towerEndpoint, JwtAuth authorization, Long workspaceId, String workflowId) {
Expand Down

0 comments on commit 4d14f3c

Please sign in to comment.