Skip to content

Cached downloads of modx#133

Merged
Mark-H merged 3 commits intomodmore:masterfrom
alroniks:cached_downloads_of_modx
Nov 4, 2015
Merged

Cached downloads of modx#133
Mark-H merged 3 commits intomodmore:masterfrom
alroniks:cached_downloads_of_modx

Conversation

@alroniks
Copy link
Collaborator

Added support caching downloaded MODX archives for avoid downloading every time.

How it works.

Gitify try download package to /home/user/.gitify folder and if you try install MODX next time Gitify will check local storage and copy folder with modx from local folder.Also you can force downloading with flag --download (-d)

Gitify modx:install -d - forced
Gitify modx:install - as usual

Also I've added command clearcache, that remove all cached versions and remove .gitify folder from home directory
Gitify clearcache

Please, test on Windows, if somobedy can, because I don't have abbility do it now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in method name, should be retrieveFromCache

@Mark-H
Copy link
Member

Mark-H commented Sep 23, 2015

Looks good @alroniks :)

@hansek do you have a chance to try this out on your windows machine?

@alroniks
Copy link
Collaborator Author

Fixed typo :)

@hansek
Copy link
Contributor

hansek commented Sep 23, 2015

@alroniks great idea

@Mark-H I'll take a look on this tonight or on the weekend ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before this line should be an index check

if (isset($_SERVER['HOME']) {
...

Otherwise this line will throw:

PHP Notice: Undefined index: HOME ...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, strange. I use isset() special for check this array key

@hansek
Copy link
Contributor

hansek commented Sep 23, 2015

I tested it just now and on my Windows setup (it's not standard windows, because I use scoop) and is working fine (except it will not install MODX because of problem with Windows file paths - this we should fix with Mark as other issue).

Will be great to have same function for packages ;)

@alroniks
Copy link
Collaborator Author

Packages are installing via modx, so it's some difficult store their local. Especially checking updates and download. But good direction, I need to think.

@Mark-H Mark-H merged commit 1234772 into modmore:master Nov 4, 2015
@alroniks alroniks deleted the cached_downloads_of_modx branch November 4, 2015 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants