Cache entire index for 10 seconds
This commit is contained in:
parent
90f27c5850
commit
0ad734eb72
|
@ -1,9 +1,10 @@
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
from django.views.decorators.cache import cache_page
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', views.index, name='index'),
|
path('', cache_page(10)(views.index), name='index'),
|
||||||
path('post/repo', views.post_repo, name='repo'),
|
path('post/repo', views.post_repo, name='repo'),
|
||||||
path('post/archive', views.post_archive, name='archive'),
|
path('post/archive', views.post_archive, name='archive'),
|
||||||
path('post/error', views.post_error, name='error'),
|
path('post/error', views.post_error, name='error'),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user