Skip to content

Commit

Permalink
fix: revert time aware feature (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
redonkulus authored Nov 13, 2019
1 parent 6aadc05 commit ba2daa3
Show file tree
Hide file tree
Showing 12 changed files with 584 additions and 3,838 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: node_js
node_js:
- "12"
- "10"
- "8"
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,18 +177,6 @@ helper.readDimensions(function(err, dimensions) {
YCB Config lets you read just the dimensions that are available for you to contextualize a request that's
coming in. This can be an array of properties such as device type, language, feature bucket, or more.

## Scheduled Configs

To support scheduled configs as described in [ycb](https://github.com/yahoo/ycb) ycb-config must be set to time aware mode via option flag and the time must be passed as a special dimension of the context when in this mode.
```
let helper = new ConfigHelper({timeAware: true});
let context = req.context;
context.time = Date.now(); //{device: 'mobile', time: 1573235678929}
helper.read(bundle, config, context, callback);
```
The time value in the context should be a millisecond timestamp. To use a custom time dimension
it may specified asn an option:`new ConfigHelper({timeDimension: 'my-time-key'})`.

## License
This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE file][] for license text and copyright information.
Expand Down
154 changes: 0 additions & 154 deletions lib/cache.js

This file was deleted.

Loading

0 comments on commit ba2daa3

Please sign in to comment.