-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Labels
Description
The document here says:
Redis::Objects automatically creates keys that are unique to each object, in the format:
model_name:id:field_name
But if two models in different namespace have same name. The generated key will be the same.
For example:
class Group < ActiveRecord::Base
include Redis::Objects
counter :test_counter
end
class XXX::Group < ActiveRecord::Base
include Redis::Objects
counter :test_counter
end
Group.first.test_counter.key
# => "group:1:test_counter"
XXX::Group.first.test_counter.key
# => "group:1:test_counter"