This commit is contained in:
Ross
2021-09-01 19:26:53 +01:00
parent 0427aa836e
commit c3b0822cf7
3 changed files with 10 additions and 2 deletions
+4
View File
@@ -196,6 +196,10 @@ CORS_ORIGIN_ALLOW_ALL = True
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
},
'filesystem': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': '/var/tmp/django_cache',
}
+4 -1
View File
@@ -1,6 +1,9 @@
from django.urls import path, include
from . import views
from django.views.decorators.cache import cache_page
app_name = "rapids"
urlpatterns = [
@@ -51,7 +54,7 @@ urlpatterns = [
views.RapidExamViews.exam_json_edit,
name="exam_json_edit",
),
path("exam/<int:pk>/scores", views.exam_scores_cid, name="exam_scores_cid"),
path("exam/<int:pk>/scores", cache_page(60 * 1)(views.exam_scores_cid), name="exam_scores_cid"),
path(
"exam/<int:pk>/scores/<int:sk>/",
views.exam_scores_cid_user,
+2 -1
View File
@@ -19,4 +19,5 @@ django-dbbackup
django-hashedfilenamestorage
djangorestframework
django-tinymce
django-zipview
django-zipview
pymemcache