Permalink
Browse files

add list of cached files

  • Loading branch information...
Jean-Philippe Boily
Jean-Philippe Boily committed Oct 2, 2012
1 parent 681e7bd commit 469efd6feea928f965efa92ddb21bd33e10f28c7
@@ -1,3 +1,6 @@
-<%= t(".warning") %>
-
-<%= t(".explanations") %>
+<div class="alert alert-block">
+ <h4><%= t(".warning") %></h4>
+ <%= t(".explanations") %>
+ <br /><br /><br />
+ <%= link_to "Configure Monologue's cache (english only)", "https://github.com/jipiboily/monologue/wiki/Configure-Monologue's-cache", :target => "_blank" %>
+</div>
@@ -1 +1,21 @@
-<td><%= link_to t(".delete"), admin_cache_path, :data => {:confirm => 'Are you sure you want to competely clear cache??'}, :method => :delete, :class => "btn btn-large btn-danger" %></td>
+<h1><%= t(".title") %></h1>
+
+<p><%= t(".description") %></p>
+
+<hr>
+
+<h2><%= t(".delete") %></h2>
+<%= link_to t(".delete"), admin_cache_path, :data => {:confirm => t(".confirm")}, :method => :delete, :class => "btn btn-large btn-danger" %>
+
+<hr>
+
+<h2><%= t(".files_in_cache") %></h2>
+<% files = Dir.glob("#{ActionController::Base.page_cache_directory}/**/*") %>
+<% if files.any? %>
+ <ul>
+ <% Dir.glob("#{ActionController::Base.page_cache_directory}/**/*").each do |file| %>
+ <% next if File.directory?(file) %>
+ <li><%= file.gsub(ActionController::Base.page_cache_directory,"") %></li>
+ <% end %>
+ </ul>
+<% end %>
View
@@ -109,11 +109,15 @@ en:
"Recent comments"
cache:
show:
+ title: "Manage cache"
+ description: "You can wompletely wipe cache here."
+ files_in_cache: "Here are the files actually cached:"
delete: "Completely wipe cache?"
+ confirm: 'Are you sure you want to competely clear cache?'
cache_wiped: "Cache was wiped!"
how_to_enable:
warning: "You can't manage cache!"
- explanations: "There are certain settings that are not set correctly to be able to use Monologue's basic cache"
+ explanations: "There are certain settings that are not set correctly to be able to use Monologue's basic cache. Please review configuration documentation."
sessions:
new:
title:
View
@@ -105,11 +105,15 @@ fr:
"Catégories<br/><i>Séparer les catégories par des virgules</i>"
cache:
show:
+ title: "Gérer la cache"
+ description: "Vous pouvez complètement effacer la cache ici."
+ files_in_cache: "Voici les fichiers en cache:"
delete: "Effacer complètement la cache?"
+ confirm: 'Voulez-vous vraiment effacer la cache?'
cache_wiped: "La cache a été effacée!"
how_to_enable:
warning: "Vous ne pouvez gérer la cache!"
- explanations: "Il y a certaines configurations à effectuer pour utiliser la gestion de cache de base de Monologue"
+ explanations: "Il y a certaines configurations à effectuer pour utiliser la gestion de cache de base de Monologue. SVP voir la documentation ci-dessous (anglais seulement)."
comments:
show:
recent_comments:
@@ -30,4 +30,11 @@
Monologue.google_plus_account_url = "https://plus.google.com/u/1/115273180419164295760/posts"
Monologue.linkedin_url = "http://www.linkedin.com/in/jipiboily"
Monologue.github_username = "jipiboily"
-Monologue.show_rss_icon = true
+Monologue.show_rss_icon = true
+
+
+# CACHE
+ # ActionController::Base.perform_caching = true
+ # ActionController::Base.page_cache_directory = = Rails.public_path + "/my-cache-dir"
+Monologue::PageCache.enabled = true
+Monologue::PageCache.wipe_enabled = true

0 comments on commit 469efd6

Please sign in to comment.