When pm-enable calls pm-download, is passes the --cache option. This is fine, although unnecessary for the wget package handler, which seems to use the cache invariantly, regardless of the setting of the --cache option. The git package handler, on the other hand, creates a git reference cache if --cache is set.
It seems to me that the --cache option should be removed from em-enable's invoke of pm-download, as this could have unintended consequences (e.g. if $options['package-handler'] = 'git_drupalorg' is permanently set in drushrc.php).
Another issue is that drush interprets --cache as a global option for downloading files, and it also interprets --cache as an sql-sync option, containing the number of hours to hold a dump in the cache. These two definitions can be in conflict.
This conflict should be resolved somehow. The other question is, how should the --cache global option affect caching, and should internal this flag be propagated in backend invoke calls in the same way that --include is (i.e., only on the same machine)?
Comments
Comment #1
moshe weitzman commentedYes, i agree that we should remove from pm-enable's invoke of pm-download.
I'm actually OK with keeping --cache as always on for wget and optionally on for git_drupalorg
I think we should remove global option --cache and add it to pm-download (and thus it appears on other commands that internally use pm-download).
Comment #2
moshe weitzman commentedI'll take this on. Does #1 sound OK to folks?
Comment #3
jonhattanI'm fine with #1
Comment #4
msonnabaum commentedOk with #1 as well.
Comment #5
moshe weitzman commentedDone per #1. See commit a7569fa if backport is needed.
cache option was already on pm-download so no todo there.
Comment #6
msonnabaum commentedSince we've had no real world reports of this being an issue, I'm thinking this doesn't need a backport.