lib/kasket/write_mixin.rb in kasket-0.9.1 vs lib/kasket/write_mixin.rb in kasket-1.0.0

- old
+ new

@@ -24,11 +24,15 @@ module InstanceMethods def kasket_key @kasket_key ||= new_record? ? nil : self.class.kasket_key_for_id(id) end + def kasket_cacheable? + true + end + def store_in_kasket - if !readonly? && kasket_key + if kasket_cacheable? && kasket_key Kasket.cache.write(kasket_key, @attributes.dup) end end def kasket_keys