From 82204a6e31136466510eb99083988ec3c6f3784e Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Mon, 16 Jul 2018 11:06:22 -0500 Subject: [PATCH] Do not cache drop https://github.com/jekyll/jekyll/pull/7136 --- lib/jekyll-seo-tag.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/jekyll-seo-tag.rb b/lib/jekyll-seo-tag.rb index ca04c65..f56b8ee 100644 --- a/lib/jekyll-seo-tag.rb +++ b/lib/jekyll-seo-tag.rb @@ -54,8 +54,13 @@ module Jekyll }) end + # The `drop` should not be cached since there is going to be just + # one instance of this class per `{% seo %}` + # i.e., if you're going to use `{% seo %}` in two templates that are + # collectively used by 50 documents, there's just going to be + # **2 instances of this class** instead of a **100**. def drop - @drop ||= Jekyll::SeoTag::Drop.new(@text, @context) + Jekyll::SeoTag::Drop.new(@text, @context) end def info