Clear the regenerator cache every time we process
To address part of #3591, clear the regenerator's cache every time the site is processed. This ensures that the regenerator doesn't incorrectly believe a file hasn't changed based on stale information.
This commit is contained in:
parent
6988eea9ce
commit
adce349d7a
|
@ -59,6 +59,14 @@ module Jekyll
|
||||||
@cache = {}
|
@cache = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Clear just the cache
|
||||||
|
#
|
||||||
|
# Returns nothing
|
||||||
|
def clear_cache
|
||||||
|
@cache = {}
|
||||||
|
end
|
||||||
|
|
||||||
# Checks if a path's (or one of its dependencies)
|
# Checks if a path's (or one of its dependencies)
|
||||||
# mtime has changed
|
# mtime has changed
|
||||||
#
|
#
|
||||||
|
|
|
@ -68,6 +68,7 @@ module Jekyll
|
||||||
self.static_files = []
|
self.static_files = []
|
||||||
self.data = {}
|
self.data = {}
|
||||||
@collections = nil
|
@collections = nil
|
||||||
|
@regenerator.clear_cache()
|
||||||
|
|
||||||
if limit_posts < 0
|
if limit_posts < 0
|
||||||
raise ArgumentError, "limit_posts must be a non-negative number"
|
raise ArgumentError, "limit_posts must be a non-negative number"
|
||||||
|
|
Loading…
Reference in New Issue