diff --git a/lib/jekyll/regenerator.rb b/lib/jekyll/regenerator.rb index 0616fdd9..b829a95c 100644 --- a/lib/jekyll/regenerator.rb +++ b/lib/jekyll/regenerator.rb @@ -59,6 +59,14 @@ module Jekyll @cache = {} end + + # Clear just the cache + # + # Returns nothing + def clear_cache + @cache = {} + end + # Checks if a path's (or one of its dependencies) # mtime has changed # diff --git a/lib/jekyll/site.rb b/lib/jekyll/site.rb index 96910255..3961669a 100644 --- a/lib/jekyll/site.rb +++ b/lib/jekyll/site.rb @@ -68,6 +68,7 @@ module Jekyll self.static_files = [] self.data = {} @collections = nil + @regenerator.clear_cache() if limit_posts < 0 raise ArgumentError, "limit_posts must be a non-negative number"