docs(cooler): give KeyPrefix and keyPrefix their own doc comments (A-IN-02)
This commit is contained in:
@@ -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 <prefix>cache:<key>,
|
||||
// rate-limit keys <prefix>rl:<key>.
|
||||
// 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 <prefix>cache:<key>,
|
||||
// rate-limit keys <prefix>rl:<key>.
|
||||
func keyPrefix(cfg *compass.Config) string {
|
||||
if cfg == nil {
|
||||
return defaultPrefix
|
||||
|
||||
Reference in New Issue
Block a user