Module: Card::Set::All::Follow::FollowerIds::ClassMethods

Defined in:
tmpsets/set/mod017-follow/all/follow/follower_ids.rb

Overview

follow cache methods on Card class

Instance Method Summary collapse

Instance Method Details

#clear_follower_ids_cacheObject



33
34
35
# File 'tmpsets/set/mod017-follow/all/follow/follower_ids.rb', line 33

def clear_follower_ids_cache
  Card.cache.write FOLLOWER_IDS_CACHE_KEY, nil
end

#follow_caches_expiredObject



20
21
22
23
# File 'tmpsets/set/mod017-follow/all/follow/follower_ids.rb', line 20

def follow_caches_expired
  Card.clear_follower_ids_cache
  Card.clear_preference_cache
end

#follower_ids_cacheObject



25
26
27
# File 'tmpsets/set/mod017-follow/all/follow/follower_ids.rb', line 25

def follower_ids_cache
  Card.cache.read(FOLLOWER_IDS_CACHE_KEY) || {}
end

#write_follower_ids_cache(hash) ⇒ Object



29
30
31
# File 'tmpsets/set/mod017-follow/all/follow/follower_ids.rb', line 29

def write_follower_ids_cache hash
  Card.cache.write FOLLOWER_IDS_CACHE_KEY, hash
end