class Contentful::ContentTypeCache
Cache for Content Types
Attributes
Public Class Methods
Source
# File lib/contentful/content_type_cache.rb, line 16 def self.cache_get(space_id, content_type_id) @cache.fetch(space_id, {}).fetch(content_type_id.to_sym, nil) end
Gets a Content Type from the Cache
Source
# File lib/contentful/content_type_cache.rb, line 21 def self.cache_set(space_id, content_type_id, klass) @cache[space_id] ||= {} @cache[space_id][content_type_id.to_sym] = klass end
Sets a Content Type in the Cache
Source
# File lib/contentful/content_type_cache.rb, line 11 def self.clear! @cache = {} end
Clears the Content Type Cache