Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ def jp2_work_presenter
# @return [String]
def manifest_cache_key
solrdoc = SolrDocument.find(params['id'])
"#{KEY_PREFIX}_#{solrdoc.id}/#{version_for(solrdoc)}"

# Add in a prefix to determine which cache to render
current_role = current_ability.can?(:edit, solrdoc) ? 'editor' : 'public'

"#{KEY_PREFIX}_#{solrdoc.id}/#{version_for(solrdoc)}/#{current_role}"
end

##
Expand Down