cache group membership methods

groups.isMember
groups.isMembers
groups.isMemberOfGroups
clear cache for user on group.join & group.leave
This commit is contained in:
barisusakli
2016-09-14 21:00:41 +03:00
parent 599ac80f3d
commit fac68d52f6
9 changed files with 213 additions and 64 deletions

View File

@@ -23,6 +23,9 @@ describe('User', function() {
testCid;
before(function(done) {
var groups = require('../src/groups');
groups.resetCache();
Categories.create({
name: 'Test Category',
description: 'A test',
@@ -37,7 +40,7 @@ describe('User', function() {
});
});
beforeEach(function(){
beforeEach(function() {
userData = {
username: 'John Smith',
fullname: 'John Smith McNamara',