lib/scrivito/workspace_data.rb in scrivito_sdk-0.60.0 vs lib/scrivito/workspace_data.rb in scrivito_sdk-0.65.0.rc1

- old
+ new

@@ -9,11 +9,34 @@ end data_attr_reader :id data_attr_reader :title data_attr_reader :memberships + data_attr_reader :revision_id + data_attr_reader :content_state_id + data_attr_reader :uses_obj_classes + data_attr_reader :base_revision_id + data_attr_reader :base_content_state_id def initialize(data) @data = data + end + + def store_in_cache + CmsDataCache.write_workspace_data(id, to_hash) + end + + private + + def to_hash + { + 'id' => id, + 'revision_id' => revision_id, + 'title' => title, + 'content_state_id' => content_state_id, + 'base_revision_id' => base_revision_id, + 'base_content_state_id' => base_content_state_id, + 'memberships' => memberships, + } end end end