🔑 Declare cache key generator inspired by Cache::Keys::DSL.
- Node v4 or later
$ yarn add keyfac
or
$ npm install --save keyfac
const { key, keygen } = requure('keyfac')
// Simple key
const userCountKey = key('user_count')
console.log(userCountKey) // => key_for_user_count
// Key with User ID
const userNameKey = keygen('user_name')
console.log(userNameKey(1)) // => gen_key_for_user_name_1See also test.js.
Create simple key.
Create key generator function with base arguments.
MIT © Pine Mizune
