Browse files 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...
1 parent 7be5643 commit 1e0db6d0b2dbbb6f1772c7cf86ffc291b1da25f4 @miracle2k committed Jul 7, 2012
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/webassets/
@@ -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,
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

0 comments on commit 1e0db6d

Please sign in to comment.