Closed luishdez closed 10 years ago
The bundles uses an interal cache for the dependency mapping from bower, this way the formulaes for the assetic resource can be created pretty fast. Since the cache is stored in the app/cache/$ENV
directory, it is necessary to re-create the cached mapping when the cache gets cleared.
In your case the app/AppKernel.php
changed which always triggers all (required) cache warmers. I think I can change the DependencyCacheWarmer to optional, so it won't be triggered when the app/AppKernel.php
changes.
I'm also considering a new configuratio option to disable the cache warmer at all, but I'm not so sure about this.
Thanks! I See!! I just remembered that I did the pull for sp:bower:warmup command…
I think that maybe it will be interesting add the "--offline" option for Bower. So It doesn't hit the network every warmup
Although my second thought is…
Componentes are kinda similar to bundles, bundles use the classmap file generated by composer and AppKernel.php , these files are not created in the cache because they should only change if you change your dependencies, maybe the json mapping file should be stored in other place like componentes folder this avoid some troubles and I think it could solve https://github.com/Spea/SpBowerBundle/issues/48 as well. What do you think?
Actually the --offline
option was already added with PR #47 :)
sp_bower:
offline: true
It is also possible to modify the directory where the cache is stored:
sp_bower:
cache_dir: path_to_cache
but you're right, it might be better to store the cache in the components directory. I will think about it :)
Why bower is executed in other tasks that are no related at all ?
It happens randomly… (probably) cached related.
I know that the problem in the screenshot it's because I haven't setup my public key … I did that on purpose to show that SpBowerBundle runs commands in other tasks.