Module: SemanticallyTaggable::Taggable::Cache::InstanceMethods

Defined in:
lib/semantically_taggable/semantically_taggable/cache.rb

Instance Method Summary collapse

Instance Method Details

#save_cached_tag_listObject



41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/semantically_taggable/semantically_taggable/cache.rb', line 41

def save_cached_tag_list
  scheme_names.map(&:to_s).each do |scheme_name|
    if self.class.send("caching_#{scheme_name.singularize}_list?")
      if tag_list_cache_set_on(scheme_name)
        list = tag_list_cache_on(scheme_name.singularize).to_a.flatten.compact.join(', ')
        self["cached_#{scheme_name.singularize}_list"] = list
      end
    end
  end
  
  true
end