lib/scrivito/cms_backend.rb in scrivito_sdk-0.50.1 vs lib/scrivito/cms_backend.rb in scrivito_sdk-0.60.0.rc1
- old
+ new
@@ -203,11 +203,11 @@
def store_blob_datas_in_cache(id, blob_datas)
%w[public_access private_access].each do |access|
%w[get head].each do |verb|
blob_data = blob_datas[access][verb]
CmsDataCache.cache.write(blob_data_cache_key(id, access, verb),
- blob_data, expires_in: blob_data['maxage'])
+ blob_data, blob_data['maxage'])
end
end
end
def blob_data_cache_key(id, access, verb)
@@ -240,10 +240,10 @@
end
def store_blob_metadata_in_cache(id, blob_metadata)
max_age = blob_metadata.delete(:cache_control) =~ /max-age=(.*),/ && $1
max_age = max_age.to_i if max_age
- CmsDataCache.cache.write(blob_metadata_cache_key(id), blob_metadata, expires_in: max_age)
+ CmsDataCache.cache.write(blob_metadata_cache_key(id), blob_metadata, max_age)
end
def blob_metadata_cache_key(id)
"blob_metadata/#{id}"
end