lib/scrivito/content_state.rb in scrivito_sdk-0.40.0 vs lib/scrivito/content_state.rb in scrivito_sdk-0.41.0.rc1

- old
+ new

@@ -9,18 +9,18 @@ # Creates a new content state with given changes and ancestor (optional). def create(attributes) new(attributes).tap do |content_state| content_state.index_changes! - CmsCacheStorage.write_content_state(content_state.content_state_id, content_state.to_hash) + CmsDataCache.write_content_state(content_state.content_state_id, content_state.to_hash) end end # Finds a previously saved content state. # Returns nil if not found. def find(content_state_id) - if content_state_data = CmsCacheStorage.read_content_state(content_state_id) + if content_state_data = CmsDataCache.read_content_state(content_state_id) new(content_state_data) end end # Fetches an existing workspace. @@ -36,25 +36,25 @@ end # Stores arbitrary data in cache. # Cache key is build from given index and key. def save_obj_data(index, key, data) - CmsCacheStorage.write_obj_data(content_state_id, index, key, data) + CmsDataCache.write_obj_data(content_state_id, index, key, data) end # Fetches previously stored arbitrary data from cache. # Returns nil if nothing found. # Cache key is build from given index and key. def find_obj_data(index, key) - CmsCacheStorage.read_obj_data(content_state_id, index, key) + CmsDataCache.read_obj_data(content_state_id, index, key) end def save_obj_classes_data(data) - CmsCacheStorage.write_obj_classes_data(content_state_id, data) + CmsDataCache.write_obj_classes_data(content_state_id, data) end def find_obj_classes_data - CmsCacheStorage.read_obj_classes_data(content_state_id) + CmsDataCache.read_obj_classes_data(content_state_id) end # Fetches and caches the ancestor. # Returns nil if there is no ancestor. def from_content_state