Class: EMISRedis::Model
- Inherits:
-
Common::RedisStore
- Object
- Common::RedisStore
- EMISRedis::Model
- Includes:
- Common::CacheAside
- Defined in:
- app/models/emis_redis/model.rb
Overview
Generic model for caching EMIS data in Redis
Direct Known Subclasses
Constant Summary
Constants inherited from Common::RedisStore
Common::RedisStore::REQ_CLASS_INSTANCE_VARS
Instance Attribute Summary collapse
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
-
.for_user(user) ⇒ EMISRedis::Model
A new
EMISRedis::Model
for fetching the passed in user’s EMIS data.
Methods included from Common::CacheAside
#cache, #cached?, #do_cached_with
Methods inherited from Common::RedisStore
create, delete, #destroy, #destroyed?, exists?, #expire, find, find_or_build, #initialize, #initialize_dup, keys, #persisted?, pop, redis_key, redis_store, redis_ttl, #save, #save!, #ttl, #update, #update!
Constructor Details
This class inherits a constructor from Common::RedisStore
Instance Attribute Details
#user ⇒ Object
Returns the value of attribute user.
12 13 14 |
# File 'app/models/emis_redis/model.rb', line 12 def user @user end |
Class Method Details
.for_user(user) ⇒ EMISRedis::Model
Returns A new EMISRedis::Model
for fetching the passed in user’s EMIS data.
17 18 19 20 21 22 23 |
# File 'app/models/emis_redis/model.rb', line 17 def self.for_user(user) redis_config_key(:emis_response) emis_model = new emis_model.user = user emis_model end |