Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Now that we've sorted out our issues with memory_store default to tha…

…t for caching. Removed File.writable? test for caching (if you implement file caching you already know it's writable).
  • Loading branch information...
commit 60acddac5b261214fa80a319cb055d992efcc025 1 parent 4dcc674
@parndt parndt authored
View
2  Gemfile.lock
@@ -119,7 +119,7 @@ GEM
gherkin (>= 2.3.5)
json (>= 1.4.6)
term-ansicolor (>= 1.0.5)
- cucumber-rails (0.4.0)
+ cucumber-rails (0.4.1)
cucumber (>= 0.10.1)
nokogiri (>= 1.4.4)
rack-test (>= 0.5.7)
View
1  changelog.md
@@ -3,6 +3,7 @@
* Improved resource picker. [Will Marshall](https://github.com/willrjmarshall)
* Improved robustness of `Page#expire_page_caching` for both `ActiveSupport::Cache::FileStore` and `ActiveSupport::Cache::MemoryStore`. [Jeff Hall](https://github.com/zenchicken)
* Optimised index sizes on MySQL. [Ruslan Doroshenko](https://github.com/rdoroshenko)
+* Changed default cache store to `:memory_store`. [Philip Arndt](https://github.com/parndt)
* `rake db:migrate` and `rake db:rollback` now works consistently when migrations from other engines are in the mix. [Vaughn Draughon](https://github.com/rocksolidwebdesign)
* [See full list](https://github.com/resolve/refinerycms/compare/0.9.9.15...0.9.9.16)
View
4 core/app/views/shared/_menu.html.erb
@@ -4,8 +4,8 @@
hide_children = RefinerySetting.find_or_set(:menu_hide_children, false) if hide_children.nil?
# Select top menu items unless 'roots' is supplied.
collection ||= @menu_pages
- caching = (cache_menu ||= RefinerySetting.find_or_set(:cache_menu, false)) && File.writable?(Rails.cache.cache_path)
- cache_if(caching && !user_signed_in?, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, cache_path ||= request.path].join('_')) do
+ caching = (cache_menu ||= RefinerySetting.find_or_set(:cache_menu, false)) && !user_signed_in?
+ cache_if(caching, [Refinery.base_cache_key, "pages_menus", dom_id, Globalize.locale, cache_path ||= request.path].join('_')) do
if (roots ||= collection.select{|p| p.parent_id.nil?}).present?
# In order to match items that aren't shown in menu and highlight their associations.
# This can be supplied if the logic is different in your case.
View
4 core/lib/refinery/application.rb
@@ -1,5 +1,3 @@
-require 'tmpdir'
-
module Refinery
module Application
@@ -41,7 +39,7 @@ def self.method_missing(method_sym, *arguments, &block)
base.config.filter_parameters += [:password, :password_confirmation]
# Specify a cache store to use
- base.config.cache_store = :file_store, File.join(Dir.tmpdir, base.name.to_s.gsub(':', '-'))
+ base.config.cache_store = :memory_store
# Include the refinery controllers and helpers dynamically
base.config.to_prepare do
View
4 pages/app/views/admin/pages/index.html.erb
@@ -1,6 +1,6 @@
<section id='records' class='tree'>
- <% caching = RefinerySetting.find_or_set(:cache_pages_backend, false) && File.writable?(Rails.cache.cache_path) %>
- <% cache_if(caching && !user_signed_in?, [Refinery.base_cache_key, "pages_backend", Globalize.locale].join('_')) do %>
+ <% caching = RefinerySetting.find_or_set(:cache_pages_backend, false) && !user_signed_in? %>
+ <% cache_if(caching, [Refinery.base_cache_key, "pages_backend", Globalize.locale].join('_')) do %>
<%= render :partial => 'records' %>
<% end %>
</section>
Please sign in to comment.
Something went wrong with that request. Please try again.