Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
f4625003
Commit
f4625003
authored
13 years ago
by
David Ormsbee
Browse files
Options
Downloads
Patches
Plain Diff
change config to not cache by default, unless overridden by server-specific settings.py
--HG-- branch : cache_separation
parent
e37eb490
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
courseware/content_parser.py
+1
-4
1 addition, 4 deletions
courseware/content_parser.py
settings.py
+7
-0
7 additions, 0 deletions
settings.py
util/cache.py
+1
-0
1 addition, 0 deletions
util/cache.py
with
9 additions
and
4 deletions
courseware/content_parser.py
+
1
−
4
View file @
f4625003
...
...
@@ -158,10 +158,7 @@ def user_groups(user):
cache_expiration
=
60
*
60
# one hour
# Kill caching on dev machines -- we switch groups a lot
if
"
dev
"
not
in
settings
.
DEFAULT_GROUPS
:
group_names
=
cache
.
get
(
fasthash
(
key
))
else
:
group_names
=
None
group_names
=
cache
.
get
(
fasthash
(
key
))
if
group_names
is
None
:
group_names
=
[
u
.
name
for
u
in
UserTestGroup
.
objects
.
filter
(
users
=
user
)]
...
...
This diff is collapsed.
Click to expand it.
settings.py
+
7
−
0
View file @
f4625003
...
...
@@ -163,6 +163,13 @@ MAKO_TEMPLATES = {}
LOGGING_ENV
=
"
dev
"
# override this in different environments
# Default dev cache (i.e. no caching)
CACHES
=
{
'
default
'
:
{
'
BACKEND
'
:
'
django.core.cache.backends.dummy.DummyCache
'
,
}
}
# Make sure we execute correctly regardless of where we're called from
execfile
(
os
.
path
.
join
(
BASE_DIR
,
"
settings.py
"
))
...
...
This diff is collapsed.
Click to expand it.
util/cache.py
+
1
−
0
View file @
f4625003
...
...
@@ -6,6 +6,7 @@ Note that 'default' is being preserved for user session caching, which we're
not migrating so as not to inconvenience users by logging them all out.
"""
from
django.core
import
cache
import
settings
# If we can't find a 'general' CACHE defined in settings.py, we simply fall back
# to returning the default cache. This will happen with dev machines.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment