move cache_store(Rails.cache) to method