Skip to content

Commit

Permalink
do not use disk-based cache for what's already in memory
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaoming committed Jul 20, 2015
1 parent c2794b2 commit af34eee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion kalite/caching/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from django.core.urlresolvers import reverse
from django.test.client import Client

from fle_utils.internet.webcache import *
from fle_utils.internet.webcache import get_web_cache, has_cache_key, expire_page, caching_is_enabled, invalidate_web_cache
from kalite import i18n, topic_tools
from kalite.topic_tools.settings import DO_NOT_RELOAD_CONTENT_CACHE_AT_STARTUP

Expand Down
2 changes: 0 additions & 2 deletions kalite/main/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@

from fle_utils.internet.decorators import api_handle_error_with_json
from fle_utils.internet.classes import JsonResponse, JsonResponseMessageError
from fle_utils.internet.webcache import backend_cache_page

from kalite.topic_tools import get_topic_tree
from kalite.topic_tools.content_recommendation import get_resume_recommendations, get_next_recommendations, get_explore_recommendations
from kalite.facility.models import FacilityUser

@api_handle_error_with_json
@backend_cache_page

This comment has been minimized.

Copy link
@jamalex

jamalex Jul 20, 2015

Member

Would be good to get double confirmation from @rtibbles that the topic tree hard/soft-caching stuff doesn't depend on this.

This comment has been minimized.

Copy link
@rtibbles

rtibbles Jul 20, 2015

Member

I don't believe it does.

This comment has been minimized.

Copy link
@benjaoming

benjaoming Jul 20, 2015

Author Contributor

I would rather believe that this outer layer of caching would risk other levels of data refreshing in case they exist.

def topic_tree(request, channel):
parent = request.GET.get("parent")
return JsonResponse(get_topic_tree(channel=channel, language=request.language, parent=parent))
Expand Down

0 comments on commit af34eee

Please sign in to comment.