[
https://issues.apache.org/jira/browse/CB-6178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961391#comment-13961391
]
ASF GitHub Bot commented on CB-6178:
------------------------------------
GitHub user sgrebnov opened a pull request:
https://github.com/apache/cordova-plugman/pull/70
CB-6178 Plugman does not cache downloaded plugins
https://issues.apache.org/jira/browse/CB-6178
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/MSOpenTech/cordova-plugman CB-6178
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugman/pull/70.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #70
----
commit 222cb532c75028e53b971baf80b280f9aa8f98e1
Author: sgrebnov <[email protected]>
Date: 2014-04-06T11:55:59Z
CB-6178 Plugman does not cache downloaded plugins
----
> Plugman does not cache downloaded plugins
> -----------------------------------------
>
> Key: CB-6178
> URL: https://issues.apache.org/jira/browse/CB-6178
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugman
> Affects Versions: 3.3.0
> Environment: Windows, OSX
> Reporter: Sergey Grebnov
> Assignee: Braden Shepherdson
> Priority: Minor
>
> It seems downloaded plugins are not cached so every time I install the same
> plugin to new project it is downloaded from the web again.
> I see, that .plugman/cache is always empty on Mac and Windows.
> https://github.com/apache/cordova-plugman/blob/master/src/registry/registry.js#L51-L56
> In registry.js I see the following logic. It tries to find existing plugin in
> .plugman/cache, but downloads plugin to system temporary dir which is
> different (C:\Users\<username>\AppData\Local\Temp\)
> {code:javascript}
> function fetchPackage(info, cl) {
> var settings = module.exports.settings;
> var d = Q.defer();
> var cached = path.resolve(settings.cache, info.name, info.version,
> 'package');
> if(fs.existsSync(cached)) {
> d.resolve(cached);
> } else {
> var download_dir = path.join(os.tmpdir(), info.name);
> shell.mkdir('-p', download_dir);
> ...
> {code}
> In my case:
> cached dir:
> C:\Users\Sergei\.plugman\cache\org.apache.cordova.console\0.2.7\package
> Donwload dir: C:\Users\Sergei\AppData\Local\Temp\org.apache.cordova.console
> And I don't see any logic where it puts it to cache after download.
--
This message was sent by Atlassian JIRA
(v6.2#6252)