Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
f6de4f21
Commit
f6de4f21
authored
Dec 16, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Location map uses a separate cache and defaults to general
parent
3f420e3d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
7 deletions
+29
-7
cms/djangoapps/auth/authz.py
+1
-2
cms/envs/dev.py
+6
-1
cms/envs/test.py
+6
-1
common/lib/xmodule/xmodule/modulestore/django.py
+5
-1
lms/envs/dev.py
+5
-1
lms/envs/test.py
+6
-1
No files found.
cms/djangoapps/auth/authz.py
View file @
f6de4f21
...
@@ -203,8 +203,7 @@ def remove_user_from_course_group(caller, user, location, role):
...
@@ -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
# 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
)
groupnames
,
_
=
get_all_course_role_groupnames
(
location
,
role
)
for
group
in
user
.
groups
.
filter
(
name__in
=
groupnames
):
user
.
groups
.
remove
(
*
user
.
groups
.
filter
(
name__in
=
groupnames
))
user
.
groups
.
remove
(
group
)
user
.
save
()
user
.
save
()
...
...
cms/envs/dev.py
View file @
f6de4f21
...
@@ -129,7 +129,12 @@ CACHES = {
...
@@ -129,7 +129,12 @@ CACHES = {
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'TIMEOUT'
:
300
,
'TIMEOUT'
:
300
,
'KEY_FUNCTION'
:
'util.memcache.safe_key'
,
'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
# Make the keyedcache startup warnings go away
...
...
cms/envs/test.py
View file @
f6de4f21
...
@@ -138,7 +138,12 @@ CACHES = {
...
@@ -138,7 +138,12 @@ CACHES = {
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'TIMEOUT'
:
300
,
'TIMEOUT'
:
300
,
'KEY_FUNCTION'
:
'util.memcache.safe_key'
,
'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
# hide ratelimit warnings while running tests
...
...
common/lib/xmodule/xmodule/modulestore/django.py
View file @
f6de4f21
...
@@ -129,8 +129,12 @@ def loc_mapper():
...
@@ -129,8 +129,12 @@ def loc_mapper():
global
_loc_singleton
global
_loc_singleton
# pylint: disable=W0212
# pylint: disable=W0212
if
_loc_singleton
is
None
:
if
_loc_singleton
is
None
:
try
:
loc_cache
=
get_cache
(
'loc_cache'
)
except
InvalidCacheBackendError
:
loc_cache
=
get_cache
(
'default'
)
# instantiate
# instantiate
_loc_singleton
=
LocMapperStore
(
get_cache
(
'default'
)
,
**
settings
.
DOC_STORE_CONFIG
)
_loc_singleton
=
LocMapperStore
(
loc_cache
,
**
settings
.
DOC_STORE_CONFIG
)
# inject into split mongo modulestore
# inject into split mongo modulestore
if
'split'
in
_MODULESTORES
:
if
'split'
in
_MODULESTORES
:
_MODULESTORES
[
'split'
]
.
loc_mapper
=
_loc_singleton
_MODULESTORES
[
'split'
]
.
loc_mapper
=
_loc_singleton
...
...
lms/envs/dev.py
View file @
f6de4f21
...
@@ -85,7 +85,11 @@ CACHES = {
...
@@ -85,7 +85,11 @@ CACHES = {
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'TIMEOUT'
:
300
,
'TIMEOUT'
:
300
,
'KEY_FUNCTION'
:
'util.memcache.safe_key'
,
'KEY_FUNCTION'
:
'util.memcache.safe_key'
,
}
},
'loc_cache'
:
{
'BACKEND'
:
'django.core.cache.backends.locmem.LocMemCache'
,
'LOCATION'
:
'edx_location_mem_cache'
,
},
}
}
...
...
lms/envs/test.py
View file @
f6de4f21
...
@@ -165,7 +165,12 @@ CACHES = {
...
@@ -165,7 +165,12 @@ CACHES = {
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'LOCATION'
:
'/var/tmp/mongo_metadata_inheritance'
,
'TIMEOUT'
:
300
,
'TIMEOUT'
:
300
,
'KEY_FUNCTION'
:
'util.memcache.safe_key'
,
'KEY_FUNCTION'
:
'util.memcache.safe_key'
,
}
},
'loc_cache'
:
{
'BACKEND'
:
'django.core.cache.backends.locmem.LocMemCache'
,
'LOCATION'
:
'edx_location_mem_cache'
,
},
}
}
# Dummy secret key for dev
# Dummy secret key for dev
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment