node acl memcached backend node acl的Memcached后端
节点ACL的Memcached后端是Memcached的后端。地位:
安装使用npm:
npm install acl-memcached-backend
例子:
var acl = require('acl'), Backend = require('acl-memcached-backend'), Memcached = require('memcached');
var client = new Memcached('localhost:11211');
var backend = new Backend(client, 28800);
var acl = new acl(backend);
acl.allow([{ roles: ['someRole'] }]);
用户评论