Compare commits
2 Commits
master
...
jekyll-cac
Author | SHA1 | Date |
---|---|---|
|
0531f19410 | |
|
82204a6e31 |
|
@ -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
|
||||
|
@ -67,7 +72,9 @@ module Jekyll
|
|||
|
||||
class << self
|
||||
def template
|
||||
@template ||= Liquid::Template.parse template_contents
|
||||
@template ||= Jekyll::Cache.new("jekyll-seo-tag").getset("template") do
|
||||
Liquid::Template.parse template_contents
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue