Closed (duplicate)
Project:
Drush Make
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2010 at 17:23 UTC
Updated:
21 Mar 2013 at 22:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
dmitrig01 commentedThat's a good idea. I'll look into this, along with other things such as unmake.
Comment #2
acrollet commentedAs an FYI, I saw the utility of such a feature, and set up squid as a proxy server. Using it with drush is then as simple as running:
Comment #3
adrinux commented@acrollet I don't suppose you'd care to document this somewhere? :)
A blog post would be nice...
Comment #4
acrollet commented@adrinux: ask, and ye shall receive: http://reluctanthacker.rollett.org/node/114
Comment #5
adrinux commentedArgh! Can't believe it's taken me two months to realize you replied to that!
Will give it a shot.
Comment #6
adrinux commentedSquid works nicely, at least for the files retrieved via http.
Comment #7
yhahn commentedAssuming that using an HTTP proxy cache is an appropriate solution to this issue.
Comment #8
dmitrig01 commentedNo, I want to implement a cache.
Comment #9
jmiccolis commentedI really think that squid is entirely appropriate for this.
@dmitrig01, can you say why you'd want to implement this in drush make? To me it seems a whole lot simpler both short and long term to leverage squid for this sort of thing.
Comment #10
Thomas_Zahreddin commentedi use git for this task.
Comment #11
dmitrig01 commentedSquid is scary and complicated. This should be fairly simple: 'tar -cf ' . md5(serialize($project)) . '.tar ' . $directory_name.
Comment #12
jmiccolis commented@dmitrig01 "scary and complicated" ...something is amiss here, why would you scared be scared of squid and me not be? I'm supposed to be the paranoid one around here. acrollet lays out the steps pretty well in his post. What specifically are you not happy with about that process?
Comment #13
jmiccolis commentedQuick update here: I've installed squid and been running it for a few days. The short: it cuts the time required to build Open Atrium about in half, and I'm on a super speedy connection. The setup via macports is even simpler that what acrollet posted on his blog. The configuration for squid ships about ready to go. So the only thing to do is start squid and export the `http_proxy` environment variable (or add it do your `drush` executable).
Comment #14
dmitrig01 commentedI think curl does this internally
Comment #15
dmitrig01 commentedor rather
Comment #16
MichaelCole commentedHi,
I'm thinking about adding this to a Drupal development environment virtual machine that I share called Quickstart. http://drupal.org/project/quickstart
I'd hate to waste anyone's development time with crazy caching problems - have yall run into any problems with this? Do you still find it useful?
Thanks,
Mike
Comment #17
adrinux commented@MichaelCole No I haven't had any problems. And yes it's still useful - particularly on a desktop vm, I find on a production server downloads are fast enough anyway (although there is still the nice advantage of not sucking up so much bandwidth), but my desktop VMware fusion vm still benefits from the speed boost.
Comment #18
moshe weitzman commentedAnyone know how to configure squid so it caches the results of updates.drupal.org such as http://updates.drupal.org/release-history/webform/6.x. By default, it does not cache those (per http headers from drupal.org) drush's pm-download and updatecode call those urls very often.
Comment #19
steve962 commentedSo... how do you handle this issue when you can't install squid? (Like when you're running in a sandbox on a shared hosting environment like Hostgator?) I see the comment about curl doing this internally, but that doesn't tell me much...
Comment #20
lyricnz commentedHere's a quick and dirty patch to drush_make that caches downloads in the local filesystem. Right now it caches forever, without regard to cacheability etc. Use at your own peril :)
@dmitrig01: let me know if you think this direction is worthwhile? obviously it needs to be much more advanced (checking cacheability, expiry, options for control, etc).
Comment #21
lyricnz commentedFix a couple of bugs.
Comment #22
lyricnz commentedMore improvements
Comment #23
izmeez commentedsubscribing
Comment #24
MichaelCole commentedHi, the Drupal Quickstart development environment comes with squid configured to cache drush make.
http://drupal.org/project/quickstart
Here's how I configure it on Ubuntu, to work with Git, shutdown quickly, and only cache ftp.drupal.org:
If you have any suggestions, I'd be excited to hear them.
Mike
Comment #25
moshe weitzman commentedIn addition to caching tarballs, I am interested in config changes such that squid will ignore the no-cache and similar http headers sent by updates.drupal.org and perform caching of the response for an hour or so. that would really speed up drush unit tests. an example url is http://updates.drupal.org/release-history/views/7.x
Comment #26
adrinux commentedTested patch from #22 on 4.4 release version of drush, and it seemed a lot snappier than using squid. Nice work @lyricnz !
Comment #28
lyricnz commentedWhile the patch in #22 works fine, it's a naive cache implementation - and could potentially cause issues with caching too much. We need a smarter implementation, but as noted above, it needs to disregard the Cache-Control/Expires headers
Comment #29
moshe weitzman commentednearly committed this cache for drush core #1173776: Optionally cache release XML and tarballs for pm-download and pm-updatecode. once that goes in, we should mark this a dupe of #581348: have drush make use the pm primitives
Comment #30
lyricnz commentedOh yes, that's way better. No need to wait until that gets in, it's a dupe already.
Comment #31
moshe weitzman commented#581348: have drush make use the pm primitives
Comment #32
kenorb commentedCan anybody confirm that the caching has been implemented? And how to use it?
I don't see any word about cache in these duplicated issues:
#581348: have drush make use the pm primitives
#1267228: Drush Make should use Drush core's native download abilities concurrently
I'm using drush 5.8 and caching doesn't work.
Comment #33
lyricnz commentedDon't reopen 2 year old issues to ask a support question. Create a new issue if you are observing a defect.