Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to easily disable disk-cache #7928

Merged
merged 4 commits into from Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/jekyll/command.rb
Expand Up @@ -67,6 +67,8 @@ def add_build_options(cmd)
cmd.option "show_drafts", "-D", "--drafts", "Render posts in the _drafts folder"
cmd.option "unpublished", "--unpublished",
"Render posts that were marked as unpublished"
cmd.option "disable_disk_cache", "--no-disk-cache",
"Disable caching to disk in non-safe mode"
cmd.option "quiet", "-q", "--quiet", "Silence output."
cmd.option "verbose", "-V", "--verbose", "Print verbose output."
cmd.option "incremental", "-I", "--incremental", "Enable incremental rebuild."
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll/site.rb
Expand Up @@ -470,7 +470,7 @@ def site_cleaner
# Disable Marshaling cache to disk in Safe Mode
def configure_cache
Jekyll::Cache.cache_dir = in_source_dir(config["cache_dir"], "Jekyll/Cache")
Jekyll::Cache.disable_disk_cache! if safe
Jekyll::Cache.disable_disk_cache! if safe || config["disable_disk_cache"]
end

def configure_plugins
Expand Down