JuliusBrussee/caveman · error
cacheengine: unknown mode %q
Error message
cacheengine: unknown mode %q
What it means
Error "cacheengine: unknown mode %q" thrown in JuliusBrussee/caveman.
Source
Thrown at cacheengine/engine.go:286
func validatePlanRequest(request PlanRequest) error {
if !validIdentity(request.Scope, 4096, false) {
return errors.New("cacheengine: invalid scope")
}
if !validIdentity(request.Epoch, 4096, false) {
return errors.New("cacheengine: invalid epoch")
}
if !validIdentity(request.PartitionKey, 4096, true) {
return errors.New("cacheengine: invalid partition key")
}
if request.ExpectedCalls < 0 || request.ExpectedRequestsPerMinute < 0 {
return errors.New("cacheengine: negative traffic expectation")
}
profile := normalizedProfile(request.Profile)
if !validIdentity(profile.ID, 256, false) || !validIdentity(profile.Provider, 64, true) || !validIdentity(profile.OptimizerID, 256, true) {
return errors.New("cacheengine: invalid profile identity")
}
if profile.Mode != ModeUnsupported && profile.Mode != ModeImplicit && profile.Mode != ModeAffinity && profile.Mode != ModeExplicit {
return fmt.Errorf("cacheengine: unknown mode %q", profile.Mode)
}
if profile.Mode != ModeUnsupported {
if profile.MaxBreakpoints <= 0 || profile.MinPrefixTokens < 0 || profile.MaxRPMPerKey < 0 || profile.TTL < 0 {
return errors.New("cacheengine: invalid cache thresholds")
}
switch profile.Attribution {
case AttributionNone, AttributionOrganic, AttributionAffinity, AttributionCausal:
default:
return fmt.Errorf("cacheengine: unknown attribution %q", profile.Attribution)
}
if profile.EconomicsKnown && (!finiteNonNegative(profile.WriteMultiplier) || !finiteNonNegative(profile.ReadMultiplier)) {
return errors.New("cacheengine: invalid cache economics")
}
}
return nil
}
func normalizedProfile(profile Profile) Profile {View on GitHub (pinned to 27d5a3981a)
Solutions
- Use a known cache engine mode.
When it happens
Trigger: Thrown at cacheengine/engine.go:286 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/d727488f4ebfce7e.
Report an issue: GitHub.