[ 
https://issues.apache.org/jira/browse/CB-6178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13971847#comment-13971847
 ] 

ASF subversion and git services commented on CB-6178:
-----------------------------------------------------

Commit 34221b31e9d376656fee7863eb98de42a5d635fa in cordova-plugman's branch 
refs/heads/master from sgrebnov
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugman.git;h=34221b3 ]

CB-6178 Plugman does not cache downloaded plugins

close #70


> 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)

Reply via email to