test/dummy/app/cachers/user_cacher.rb in cachers-0.1.1 vs test/dummy/app/cachers/user_cacher.rb in cachers-4.0.0.0
- old
+ new
@@ -1,17 +1,17 @@
class UserCacher < Cachers::Base
def cache
- $redis.set key, record.name
+ $redis.set key, record.id
end
def uncache
$redis.del key
end
private
def key
- "users/#{record.id}"
+ "users/#{record.name}"
end
end