jekyll-include-cache 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f946d79dcbf820b5aa6d6db11a37a0e5746c23ccc3ba4db4041f59cb94e39521
4
- data.tar.gz: df990433cc6daed63dc0bd1d2a5b82fb74da693a4f91ea9338fbb327021595d7
3
+ metadata.gz: d8404e6aa18c18acf66c693668b8c4a6f8a205c19f5d601e08902c586dd9c121
4
+ data.tar.gz: 12c6593f322b80f18ac612c410bf6f371aca711b6441e6aeb6495cf5a9c36e0e
5
5
  SHA512:
6
- metadata.gz: f4adba885778a92c25f9856bbcfdc764ecf2ee733eb1d683fc88497a9db1607feaae6c351e25ebbaee4f6931f30c3bf72d32633277f73db947d65f51cce1c5dd
7
- data.tar.gz: bb750103867e6b6709b9445cd95c26adad3e234df0f00c2343a9732924df019dfea79f63e7b6ea1254350823e5ba92e5566b41777bb0eb3a2c6acd9f8769ff9a
6
+ metadata.gz: 521d68c45d193bb31daf675daa9d283a580058801e430b598fed681ecd179ebb6fcfc01b338a6958986d35f1b11e680357b22f724a96b15e721d552a61c37472
7
+ data.tar.gz: 6e7586b6916faef3ef5d14e418d40ef4d60783ec80f57f05518214eafb8d172ba35b5401430ba16e1386c2ee47d1d7569418d7323a91b25a3230db9da4fd33db
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Jekyll 4.x comptable caching class for pre-4.x compatibility
3
+ # A minimal in-memory cache exposing the subset of Jekyll::Cache's API we use
4
4
  module JekyllIncludeCache
5
5
  class Cache
6
6
  extend Forwardable
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllIncludeCache
4
- VERSION = "0.2.2"
4
+ VERSION = "0.3.0"
5
5
  end
@@ -7,16 +7,20 @@ module JekyllIncludeCache
7
7
  autoload :Cache, "jekyll-include-cache/cache"
8
8
 
9
9
  class << self
10
+ # An in-memory cache of rendered includes.
11
+ #
12
+ # This deliberately doesn't use Jekyll::Cache: the cache is cleared on
13
+ # every render, so persisting entries to disk (Marshal + SHA2 per write)
14
+ # only costs time and never produces a hit on the next build.
10
15
  def cache
11
- @cache ||= if defined? Jekyll::Cache
12
- Jekyll::Cache.new(self.class.name)
13
- else
14
- JekyllIncludeCache::Cache.new
15
- end
16
+ @cache ||= JekyllIncludeCache::Cache.new
16
17
  end
17
18
 
18
19
  def reset
19
20
  JekyllIncludeCache.cache.clear
21
+ # Keys are derived from object ids, which are only meaningful within a
22
+ # single build, so don't let the memo grow across `jekyll serve` rebuilds.
23
+ JekyllIncludeCache::Tag.digest_cache.clear
20
24
  end
21
25
  end
22
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-include-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
@@ -176,14 +176,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: '0'
179
+ version: '3.0'
180
180
  required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements:
182
182
  - - ">="
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  requirements: []
186
- rubygems_version: 4.0.16
186
+ rubygems_version: 3.6.9
187
187
  specification_version: 4
188
188
  summary: A Jekyll plugin to cache the rendering of Liquid includes
189
189
  test_files: []