diff --git a/modules/cooler/cooler.go b/modules/cooler/cooler.go index 6811098c..7879e8c9 100644 --- a/modules/cooler/cooler.go +++ b/modules/cooler/cooler.go @@ -350,11 +350,6 @@ func driverName(cfg *compass.Config, key string) (string, error) { return "", fmt.Errorf("cooler: %s must be %s or %s, got %q", key, driverMemory, driverRedis, v) } -// keyPrefix returns the key prefix every cooler key starts with: cache.prefix -// when set, otherwise app.name lower-cased with every run of characters -// outside [a-z0-9] replaced by "_" (trimmed at both ends) and a trailing ":", -// or "summer:" when app.name is empty too. Cache keys are cache:, -// rate-limit keys rl:. // KeyPrefix returns the key prefix every cooler key of this application // starts with (see keyPrefix: cache.prefix, else app.name as a slug plus // ":", else "summer:"), so another framework module keeps its Redis keys @@ -363,6 +358,11 @@ func KeyPrefix(cfg *compass.Config) string { return keyPrefix(cfg) } +// keyPrefix returns the key prefix every cooler key starts with: cache.prefix +// when set, otherwise app.name lower-cased with every run of characters +// outside [a-z0-9] replaced by "_" (trimmed at both ends) and a trailing ":", +// or "summer:" when app.name is empty too. Cache keys are cache:, +// rate-limit keys rl:. func keyPrefix(cfg *compass.Config) string { if cfg == nil { return defaultPrefix