Why is the magento/downloader/cache.cfg file used for? can I ignore that file in the gitignore file
Yes it is safe to ignore this in your
.gitignore. I normally have the following:
# Ignore downloader cache and configuration files /downloader/.cache/ /downloader/cache.cfg /downloader/connect.cfg
As for the
cache.cfg file, this contains a gziped, PHP serialized array that contains all the current configuration information for you Magento Connect instance. This is where it stores extension versions.
It is not safe to ignore cache.cfg if you ever use
./mage upgrade or magento connect to keep track of packages.
.gitignore. If you are just rsyncing to a server, then yes, the entire downloader folder can be left behind. But for development, you should share it, just like you would a package.json or a composer.lock.
# Ignore downloader cache, but not cache.cfg /downloader/.cache/
/downloader/connect.cfg contain configuration details about what version the packages you downloaded are on. While it's easy to recover it, it's better to keep it in version control.
$ ./mage list-installed Installed package for channel 'community' : Fooman_SpeedsterAdvanced 0.8.14 beta Fooman_Common 1.2.8 stable $ rm downloader/cache.cfg $ ./mage list-installed No installed packages