Class: Developer
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Developer
- Defined in:
- app/models/developer.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.id_cache ⇒ Object
9 10 11 |
# File 'app/models/developer.rb', line 9 def self.id_cache @id_cache ||= DistributedCache.new("developer_ids") end |
.rebuild_cache ⇒ Object
17 18 19 |
# File 'app/models/developer.rb', line 17 def self.rebuild_cache id_cache.clear end |
.user_ids ⇒ Object
13 14 15 |
# File 'app/models/developer.rb', line 13 def self.user_ids id_cache.defer_get_set("ids") { Set.new(Developer.pluck(:user_id)) } end |
Instance Method Details
#rebuild_cache ⇒ Object
21 22 23 |
# File 'app/models/developer.rb', line 21 def rebuild_cache Developer.rebuild_cache end |