MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge / Set

Method Set

internal/cache/cache.go:39–39  ·  view source on GitHub ↗

Set stores a value in the cache with a specified time-to-live (TTL). Parameters: - ctx: The context for managing the request lifecycle. - key: The cache key under which the value will be stored. - value: The value to be stored in the cache. - ttl: The duration the value should be retained in the cac

(ctx context.Context, key string, value interface{}, ttl time.Duration)

Source from the content-addressed store, hash-verified

37 // - ttl: The duration the value should be retained in the cache.
38 // Returns an error if the operation fails.
39 Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error
40
41 // Get retrieves a value from the cache using a given key.
42 // Parameters:

Callers 15

TestSetFunction · 0.95
TestGetFunction · 0.95
TestDeleteFunction · 0.95
applyExternalAccountFunction · 0.65
processHTTPFunction · 0.65
sequentialAllocationMethod · 0.65

Implementers 3

mockCachedatabase/transactions_test.go
mockCacheRecondatabase/reconciliation_test.go
RedisCacheinternal/cache/cache.go

Calls

no outgoing calls

Tested by 15

TestSetFunction · 0.76
TestGetFunction · 0.76
TestDeleteFunction · 0.76
TestRedisIntegrationFunction · 0.52
TestRegisterHookFunction · 0.52
TestUpdateHookFunction · 0.52
SetUpTestRequestFunction · 0.52
buildJSONContextFunction · 0.52
TestStartReconciliationFunction · 0.52
TestCreateMatchingRuleFunction · 0.52