Allow for configurable group separator

This commit is contained in:
David Czarnecki
2012-04-18 14:44:36 -04:00
parent a9cf3938cf
commit fa182e618d
7 changed files with 71 additions and 8 deletions

View File

@@ -149,7 +149,12 @@ is the label that you're storing to, or fetching from.
Labels support multiple grouping levels by splitting the label string with `/`
and storing the same stats for each level. For example, when storing data to a
label called `views/product/44`, the data is stored for the label you specify,
and also for `views/product` and `views`.
and also for `views/product` and `views`. You may also configure a different
group separator using the `Redistat.group_separator` option. For example:
```ruby
Redistat.group_separator = '|'
```
A word of caution: Don't use a crazy number of group levels. As two levels
causes twice as many `hincrby` calls to Redis as not using the grouping