refactor HTTParty and Rails:Cache.fetch into separate method