summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-10-28 11:40:32 +0200
committerBryce Johnson <bryce@gitlab.com>2016-10-28 11:40:32 +0200
commit55c291d18db646eecf635aa4efe34a6c1c7efbb4 (patch)
tree68dbae421a0b9155522414c67347562c5db6905d
parentf879319840949c1d4b363742cb9573d89abd1296 (diff)
downloadgitlab-ce-turbolinks-cache-bust.tar.gz
Test some solutions.turbolinks-cache-bust
-rw-r--r--app/assets/javascripts/application.js5
-rw-r--r--app/views/layouts/application.html.haml2
2 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index e57cf1b3a58..88f1dec706f 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -55,6 +55,11 @@
/*= require fuzzaldrin-plus */
(function() {
+
+ $(window).on('page:change', function() {
+ Turbolinks.pagesCached(0);
+ });
+
window.slugify = function(text) {
return text.replace(/[^-a-zA-Z0-9]+/g, '_').toLowerCase();
};
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 6c2285fa2b6..3ff59f5c1d0 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,5 +1,5 @@
!!! 5
-%html{ lang: "en", class: "#{page_class}" }
+%html{ lang: "en", class: "#{page_class}", 'data-no-transition-cache': true }
= render "layouts/head"
%body{class: "#{user_application_theme}", data: {page: body_data_page, project: "#{@project.path if @project}", group: "#{@group.path if @group}"}}
= Gon::Base.render_data