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

Cache insights views #3095

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pontoon/insights/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
from django.urls import path
from django.views.decorators.cache import cache_page

from pontoon.settings import VIEW_CACHE_TIMEOUT

from . import views

urlpatterns = [
# Insights page
path("insights/", views.insights, name="pontoon.insights"),
path(
"insights/",
cache_page(VIEW_CACHE_TIMEOUT)(views.insights),
name="pontoon.insights",
),
]
2 changes: 1 addition & 1 deletion pontoon/localizations/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
# Project insights
path(
"insights/",
views.ajax_insights,
cache_page(VIEW_CACHE_TIMEOUT)(views.ajax_insights),
name="pontoon.localizations.ajax.insights",
),
]
Expand Down
2 changes: 1 addition & 1 deletion pontoon/projects/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
# Project insights
path(
"insights/",
views.ajax_insights,
cache_page(VIEW_CACHE_TIMEOUT)(views.ajax_insights),
name="pontoon.projects.ajax.insights",
),
# Project info
Expand Down
2 changes: 1 addition & 1 deletion pontoon/teams/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
# Team insights
path(
"insights/",
views.ajax_insights,
cache_page(VIEW_CACHE_TIMEOUT)(views.ajax_insights),
name="pontoon.teams.ajax.insights",
),
# Team info
Expand Down
Loading