TT-18001: Add caching with invalidation logic - #172
Conversation
…f ssh://github.com/TykTechnologies/storage into feat/TT-17702/add-lister-and-setter-logic
…brary doesn't handle connection
TT-17626: Add azure implementation
…s but later should be tested and finished
…to avoid 60s retry on tests
…ovider TT-17624: Add GCP provider
This reverts commit c3b4074.
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|
This PR introduces a comprehensive, in-memory caching layer for the Files Changed Analysis
Architecture & Impact AssessmentWhat this PR accomplishesThis PR adds a configurable in-memory caching layer to the secret retrieval process. It aims to improve performance and resilience by reducing direct calls to external secret backends. Key technical changes introduced
Affected system components
System Flow DiagramsequenceDiagram
participant C as Caller
participant SS as SecretStore
participant CA as cache.Cache
participant P as Provider
C->>SS: Get(ctx, "key")
SS->>CA: Get("key")
alt Cache Hit (valid)
CA-->>SS: value, found=true, needsRefresh=false
SS-->>C: returns value
else Cache Hit (stale)
CA-->>SS: value, found=true, needsRefresh=true
SS-->>C: returns stale value
note right of SS: Triggers non-blocking background refresh
SS->>P: Get(bg_ctx, "key")
P-->>SS: new_value
SS->>CA: Set("key", new_value)
else Cache Miss / Bypass
CA-->>SS: "", found=false
note right of SS: singleflight deduplicates provider calls
SS->>P: Get(ctx, "key")
P-->>SS: value, err
SS->>CA: Set("key", value, err)
SS-->>C: returns value, err
end
Scope Discovery & Context ExpansionThis change impacts the entire secret resolution pipeline. The introduction of caching alters the performance and data consistency characteristics of the system.
Metadata
Powered by Visor from Probelabs Last updated: 2026-08-14T08:08:19.320Z | Triggered by: pr_opened | Commit: 3daf5f6 💡 TIP: You can chat with Visor using |
Security Issues (1)
Security Issues (1)
Performance Issues (1)
Powered by Visor from Probelabs Last updated: 2026-08-14T08:07:55.634Z | Triggered by: pr_opened | Commit: 3daf5f6 💡 TIP: You can chat with Visor using |
|



Description
Ticket: https://tyktech.atlassian.net/browse/TT-18001
Related Issue
Motivation and Context
Test Coverage For This Change
Screenshots (if appropriate)
Types of changes
Checklist
master!masterbranch (left side). Also, it would be best if you started your change off our latestmaster.go mod tidy && go mod vendorgofmt -s -w .go vet ./...Ticket Details
TT-18001
Generated at: 2026-08-14 08:06:22