lib/scrivito/content_state.rb in scrivito_sdk-0.65.2 vs lib/scrivito/content_state.rb in scrivito_sdk-0.66.0.rc1

- old
+ new

@@ -46,18 +46,10 @@ # Cache key is build from given index and key. def find_obj_data(index, key) CmsDataCache.read_obj_data(content_state_id, index, key) end - def save_obj_classes_data(data) - CmsDataCache.write_obj_classes_data(content_state_id, data) - end - - def find_obj_classes_data - 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 @from_content_state ||= self.class.find(from_content_state_id) end @@ -80,10 +72,10 @@ if changes.present? changes.each do |hash| id_index.add(hash['id']) if path = hash['modified_path'] path_index.add(path) - ppath_index.add(path.gsub(/\/[^\/]+$/, '').presence || '/') if path != '/' + ppath_index.add(ParentPath.of(path)) if path != '/' end end end self.changes = nil self.changes_index = {'id' => id_index, 'path' => path_index, 'ppath' => ppath_index}