Skip to content
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
1 change: 1 addition & 0 deletions changes/209.canada.changes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The JS i18n API endpoint is no longer cache-able.
5 changes: 5 additions & 0 deletions ckan/views/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
)
from ckan.types import Context, Response, ActionResult

# (canada fork only): nocache decorator
# TODO: upstream contrib??
from . import nocache_store


log = logging.getLogger(__name__)

Expand Down Expand Up @@ -496,6 +500,7 @@ def snippet(snippet_path: str, ver: int = API_REST_DEFAULT_VERSION) -> str:
return render(snippet_path, extra_vars=extra_vars)


@nocache_store
def i18n_js_translations(
lang: str,
ver: int = API_REST_DEFAULT_VERSION) -> Union[str, Response]:
Expand Down