Skip to content

Commit 8068584

Browse files
committed
cache per version
1 parent 031b67f commit 8068584

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

app/views/pages/api/liquid/filters/index.json.liquid

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{% cache 'lsp-filters-json' %}
1+
{% assign cache_key = context.version | append: '-lsp-filters-json' %}
2+
{% cache cache_key %}
23
{%- capture url -%}https://deidcfp1yn7c2.cloudfront.net/platform_docs/{{ context.version }}/filters.json{%- endcapture -%}
34
{% assign data = url | download_file | parse_json: raw_text: true %}
45
{% render 'api/liquid/filters', data: data %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{% cache 'lsp-objects-json' %}
2-
{% render 'api/liquid/objects' %}
2+
{% render 'api/liquid/objects' %}
33
{% endcache %}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
{% cache 'lsp-tags-json' %}
2-
{%- capture url -%}https://deidcfp1yn7c2.cloudfront.net/platform_docs/{{ context.version }}/tags.json{%- endcapture -%}
3-
{% assign data = url | download_file | parse_json: raw_text: true %}
4-
{% render 'api/liquid/tags', data: data %}
1+
{% assign cache_key = context.version | append: '-lsp-tags-json' %}
2+
{% cache cache_key %}
3+
{%- capture url -%}https://deidcfp1yn7c2.cloudfront.net/platform_docs/{{ context.version }}/tags.json{%- endcapture -%}
4+
{% assign data = url | download_file | parse_json: raw_text: true %}
5+
{% render 'api/liquid/tags', data: data %}
56
{% endcache %}

0 commit comments

Comments
 (0)