Reset the memory cache before each watcher run.
This commit is contained in:
parent
9e54d7bcb7
commit
ece275a054
@ -62,15 +62,16 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
unless Compass.sass_engine_options[:cache_store]
|
unless Compass.sass_engine_options[:cache_store]
|
||||||
|
@memory_cache = Sass::CacheStores::Memory.new
|
||||||
Compass.configuration.sass_options ||= {}
|
Compass.configuration.sass_options ||= {}
|
||||||
Compass.configuration.sass_options[:cache_store] =
|
Sass::CacheStores::Chain.new(
|
||||||
Sass::CacheStores::Chain.new(
|
@memory_cache,
|
||||||
Sass::CacheStores::Memory.new,
|
Sass::CacheStores::Filesystem.new(
|
||||||
Sass::CacheStores::Filesystem.new(
|
Compass.sass_engine_options[:cache_location] ||
|
||||||
Compass.sass_engine_options[:cache_location] ||
|
Sass::Engine::DEFAULT_OPTIONS[:cache_location]
|
||||||
Sass::Engine::DEFAULT_OPTIONS[:cache_location]
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
check_for_sass_files!(new_compiler_instance)
|
check_for_sass_files!(new_compiler_instance)
|
||||||
@ -136,6 +137,7 @@ module Compass
|
|||||||
end
|
end
|
||||||
|
|
||||||
def recompile(base = nil, relative = nil)
|
def recompile(base = nil, relative = nil)
|
||||||
|
@memory_cache.reset! if @memory_cache
|
||||||
compiler = new_compiler_instance(:quiet => true)
|
compiler = new_compiler_instance(:quiet => true)
|
||||||
if file = compiler.out_of_date?
|
if file = compiler.out_of_date?
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user