From 8b984eafe6bb6381c564fa2b969880e09465af80 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 28 Dec 2020 17:55:39 -0300 Subject: [PATCH] =?UTF-8?q?si=20el=20art=C3=ADculo=20es=20nuevo=20usar=20e?= =?UTF-8?q?l=20layout=20como=20cache=5Fkey=20closes=20#224?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/metadata_template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/metadata_template.rb b/app/models/metadata_template.rb index b8be5a10..e7e2edb8 100644 --- a/app/models/metadata_template.rb +++ b/app/models/metadata_template.rb @@ -12,7 +12,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type, # Queremos que los artículos nuevos siempre cacheen, si usamos el UUID # siempre vamos a obtener un item nuevo. def cache_key - return name.to_s if post.new? + return layout.value + '/' + name.to_s if post.new? @cache_key ||= 'post/' + post.uuid.value + '/' + name.to_s end