diff --git a/app/controllers/internal/tools_controller.rb b/app/controllers/internal/tools_controller.rb index 9de1080f1..9c6b9eac2 100644 --- a/app/controllers/internal/tools_controller.rb +++ b/app/controllers/internal/tools_controller.rb @@ -29,6 +29,7 @@ class Internal::ToolsController < Internal::ApplicationController def bust_link(link) cb = CacheBuster.new + link.sub!("https://dev.to", "") if link.starts_with?("https://dev.to") cb.bust(link) cb.bust(link + "/") cb.bust(link + "?i=i") diff --git a/app/views/internal/tools/index.html.erb b/app/views/internal/tools/index.html.erb index 833161853..9af332df1 100644 --- a/app/views/internal/tools/index.html.erb +++ b/app/views/internal/tools/index.html.erb @@ -1,22 +1,23 @@ -
For a page that should 404:
+For a page that should 404. This will purge the page via Fastly.
+Use the full path (https://dev.to/xyz) or the relative path: (/xyz)
<%= form_tag "/internal/tools/bust_cache" do %> - <%= label_tag("Relative Link:") %> + <%= label_tag("Link:") %> <%= text_field_tag :dead_link, nil, placeholder: "/devteam/page" %> <%= submit_tag("Clear Cache") %> <% end %>This clears the rails cache & the fastly cache.
+This clears both the Rails cache & the Fastly cache.
<%= form_tag "/internal/tools/bust_cache" do %> - <%= label_tag("Article id: ") %> + <%= label_tag("Article ID: ") %> <%= text_field_tag :bust_article, nil, placeholder: "12345" %> <%= submit_tag("Clear Cache") %> <% end %>