mirror of
https://github.com/SigNoz/signoz.git
synced 2026-03-13 16:52:07 +00:00
## 📄 Summary
- Instead of relying on JWT for session management, we are adding another token system: opaque. This gives the benefits of expiration and revocation.
- We are now ensuring that emails are regex checked throughout the backend.
- Support has been added for OIDC protocol
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package cache
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
v3 "github.com/SigNoz/signoz/pkg/query-service/model/v3"
|
|
"github.com/SigNoz/signoz/pkg/types/cachetypes"
|
|
"github.com/SigNoz/signoz/pkg/valuer"
|
|
)
|
|
|
|
type Cache interface {
|
|
// Set sets the cacheable entity in cache.
|
|
Set(ctx context.Context, orgID valuer.UUID, cacheKey string, data cachetypes.Cacheable, ttl time.Duration) error
|
|
|
|
// Get gets the cacheble entity in the dest entity passed.
|
|
// TODO: Remove allowExpired from Get.
|
|
Get(ctx context.Context, orgID valuer.UUID, cacheKey string, dest cachetypes.Cacheable, allowExpired bool) error
|
|
|
|
// Delete deletes the cacheable entity from cache
|
|
Delete(ctx context.Context, orgID valuer.UUID, cacheKey string)
|
|
|
|
// DeleteMany deletes multiple cacheble entities from cache
|
|
DeleteMany(ctx context.Context, orgID valuer.UUID, cacheKeys []string)
|
|
}
|
|
|
|
type KeyGenerator interface {
|
|
// GenerateKeys generates the cache keys for the given query range params
|
|
// The keys are returned as a map where the key is the query name and the value is the cache key
|
|
GenerateKeys(*v3.QueryRangeParamsV3) map[string]string
|
|
}
|