Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write cache data in user space #4109 #4122

Merged
merged 6 commits into from
Jul 22, 2015

Conversation

benjaoming
Copy link
Contributor

Resolves #4109.

@benjaoming benjaoming force-pushed the user-data-cache-files branch from c7cbefd to c69812c Compare July 20, 2015 12:56
@benjaoming benjaoming force-pushed the user-data-cache-files branch from c69812c to 3551e55 Compare July 20, 2015 13:26
@benjaoming benjaoming force-pushed the user-data-cache-files branch from a652420 to 10fe718 Compare July 20, 2015 13:27
@benjaoming
Copy link
Contributor Author

Now it resolves #4109 ! The topics cache was written wrongly, works after renaming topics to cached_topics. Also moved the block earlier so default topics JSON isn't always loaded.

@benjaoming benjaoming added this to the 0.14.0 milestone Jul 20, 2015
@benjaoming benjaoming mentioned this pull request Jul 20, 2015
5 tasks
def cache_file_path(basename):
"""Consistently return path for a cache filename. This path has to be
writable for the user running kalite."""
assert "/" not in basename, "Please use a valid filename"

This comment was marked as spam.

This comment was marked as spam.

@benjaoming benjaoming mentioned this pull request Jul 20, 2015
if language == "en": # English-language exercises live in application space, translations in user space

# English-language exercises live in application space, translations in user space
if language == "en":

This comment was marked as spam.

This comment was marked as spam.

@@ -266,16 +287,22 @@ def get_content_cache(force=False, annotate=False, language=None):

if CONTENT is None:
CONTENT = {}

if settings.DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP and not force:

This comment was marked as spam.

This comment was marked as spam.

This was referenced Jul 22, 2015
@rtibbles
Copy link
Member

Yep, this seems to preserve the intended functionality, while allowing flexible cache path writing, and preventing an unnecessary load of the JSON files.

MCGallaspy added a commit that referenced this pull request Jul 22, 2015
@MCGallaspy MCGallaspy merged commit b797c44 into learningequality:0.14.x Jul 22, 2015
@MCGallaspy MCGallaspy removed the has PR label Jul 22, 2015
@benjaoming benjaoming deleted the user-data-cache-files branch August 19, 2015 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants