fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.07k stars 111 forks source link

Adding support for composer cache - http://getcomposer.org/ #48

Closed fh closed 10 years ago

fh commented 11 years ago

Initial support for composer cache.

fgrehm commented 10 years ago

Thanks for the PR! Although I've done a lot of PHP in the past I'm not familiar with Composer so it might take me some time to try this out. I'll have a look at the code for now :)

fgrehm commented 10 years ago

@patcon IIRC you are a PHP dev right? would you mind jumping in on this one? ;)

fgrehm commented 10 years ago

@fh would you be able to point me to an example app that uses composer so that I can try this out? :D

fh commented 10 years ago

@fgrehm I just created https://github.com/fh/composer-example to test it.

fgrehm commented 10 years ago

@fh tks, I'll give it a shot later on tonight

fgrehm commented 10 years ago

@fh Wow, I had some time now and did a quick test with the repo you provided and the installation went from 2m45s down to 1m2s! That's awesome, thanks a lot! :fireworks: Just need to mention that the results were better when the composer.lock was kept between VMs rebuilds. But since it seems that the file should be commited to the repository, I believe this will not be a problem :)

If @patcon can give us a :thumbsup: before the end of the day we can probably ship this on 0.4.0, I've made the changes to detect whether PHP is installed on the composer-cache branch and opened up a new PR with it that "superseeds" this one :)

fh commented 10 years ago

@fgrehm Cool :) For bigger projects, the time saved should be even way bigger.

Yes, Composer.lock is something that is supposed to be committed always with the repository. It should be the same with Gemfiles, if I understood that correctly. So no need to cache it within the plugin.

patcon commented 10 years ago

If I'm understanding correctly, this is good to close in favour of #50. Reopen if I'm mistaken!

fgrehm commented 10 years ago

@patcon tks, I ended up forgetting about it :)