ahawkins / cashier

Tag based caching for Rails using Redis. Associate different cached content with a tag, then expire by tag instead of key.
MIT License
162 stars 39 forks source link

Current version of gem doesn't work #13

Closed lukes closed 11 years ago

lukes commented 11 years ago

The currently released version of the gem (0.4.0) doesn't work unless I open up the downloaded gem, and add

ActiveSupport::Cache::Store.instrument = true
  ActiveSupport::Notifications.subscribe("cache_write.active_support") do |*args|
  payload = ActiveSupport::Notifications::Event.new(*args).payload
  Cashier.store_fragment payload[:key], payload[:tag] if payload[:tag]
end

to the bottom of lib/cashier.rb. If I instead point my Gemfile to your git repo then Cashier works. I notice there's a couple of weeks difference between the last gem release and when you added the above lines to lib/cashier.rb.

ScotterC commented 11 years ago

+1 on this. This also fixes https://github.com/twinturbo/cashier/issues/6

ahawkins commented 11 years ago

@lukes @ScotterC v 0.4.1 just released. IDK how I missed that!

lukes commented 11 years ago

No worries - thanks for the quick turn around and very much appreciate all your work!