Permalink
Browse files

ActiveRecord workaround (only cached object prohibits deletion, fix)

git-svn-id: http://svn.verbdev.com/rb/caches.rb/trunk@77 f28541f9-331e-0410-82d8-e175c77b79a1
  • Loading branch information...
1 parent d7d310f commit b254350e98959a09bde79b122995dd1584531cb4 yrashk committed Apr 8, 2007
Showing with 10 additions and 2 deletions.
  1. +2 −2 init.rb
  2. +8 −0 lib/caches.rb
View
@@ -8,11 +8,11 @@
include Caches::Helper::PerID
def self.remove_methods_on_reset?
- false
+ true
end
def self.remove_variables_on_reset?
- false
+ true
end
def self.reset_subclasses #:nodoc:
View
@@ -203,6 +203,14 @@ def invalidate_all_caches(*opts)
def class_caches(*args)
c = class_eval do
class <<self
+ def remove_methods_on_reset?
+ false
+ end
+
+ def remove_variables_on_reset?
+ false
+ end
+
extend ::Caches
end
end

0 comments on commit b254350

Please sign in to comment.