Location map uses a separate cache and defaults to general

This commit is contained in:
Don Mitchell
2013-12-16 12:31:19 -05:00
parent 3f420e3d63
commit f6de4f2186
6 changed files with 29 additions and 7 deletions

View File

@@ -203,8 +203,7 @@ def remove_user_from_course_group(caller, user, location, role):
# see if the user is actually in that role, if not then we don't have to do anything
groupnames, _ = get_all_course_role_groupnames(location, role)
for group in user.groups.filter(name__in=groupnames):
user.groups.remove(group)
user.groups.remove(*user.groups.filter(name__in=groupnames))
user.save()

View File

@@ -129,7 +129,12 @@ CACHES = {
'LOCATION': '/var/tmp/mongo_metadata_inheritance',
'TIMEOUT': 300,
'KEY_FUNCTION': 'util.memcache.safe_key',
}
},
'loc_cache': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'edx_location_mem_cache',
},
}
# Make the keyedcache startup warnings go away

View File

@@ -138,7 +138,12 @@ CACHES = {
'LOCATION': '/var/tmp/mongo_metadata_inheritance',
'TIMEOUT': 300,
'KEY_FUNCTION': 'util.memcache.safe_key',
}
},
'loc_cache': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': 'edx_location_mem_cache',
},
}
# hide ratelimit warnings while running tests