Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Bundle.build(): disable_cache=False behavior.

This used to override the auto-select behavior. The CLI interface used this,
as a result of which the cache was not disabled when running a build command,
in cases where it should have.

This could also have been changed in the CLI code, but it's an easy mistake to
make, and there really is no good reason to use the cache in cases where it
clearly can lead to incorrect results.
  • Loading branch information...
commit 1e0db6d0b2dbbb6f1772c7cf86ffc291b1da25f4 1 parent 7be5643
@miracle2k authored
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/webassets/bundle.py
View
8 src/webassets/bundle.py
@@ -388,10 +388,7 @@ def _merge_and_apply(self, env, output, force, parent_debug=None,
# Note: This decision only affects the current bundle instance. Even if
# dependencies cause us to ignore the cache for this bundle instance,
# child bundles may still use it!
- if disable_cache is None:
- actually_skip_cache_here = bool(self.resolve_depends(env))
- else:
- actually_skip_cache_here = disable_cache
+ actually_skip_cache_here = disable_cache or bool(self.resolve_depends(env))
filtertool = FilterTool(
env.cache, no_cache_read=actually_skip_cache_here,
@@ -491,9 +488,6 @@ def _build(self, env, extra_filters=[], force=None, output=None,
else:
update_needed = env.updater.needs_rebuild(self, env) \
if env.updater else True
- # _merge_and_apply() is now smart enough to do without
- # this disable_cache hint, but for now, keep passing it
- # along if we get the info from the updater.
if update_needed==SKIP_CACHE:
disable_cache = True
Please sign in to comment.
Something went wrong with that request. Please try again.