Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer loading from cache

i ran in a problem using composer for installing/uninstalling some dependencies in laravel which coming back after deleting them from composer.json and deleting their vendor folder, i initially used dflydev's markdown package but now i wanted to change it to michelf's php-markdown, but i cant uninstall the old one since it comes back loaded from cache, which i checked at AppData\Roaming\Composer and is empty, any clue on to why this is happening?

  - Installing dflydev/markdown (dev-master dee1f7a)     Loading from cache 
like image 943
Tarik Avatar asked Mar 27 '14 22:03

Tarik


People also ask

Where is composer cache stored?

the cache locations are: Windows: %LOCALAPPDATA%\Composer\files\vendor\packagename. Linux: ~/. composer/cache/files/vendor/packagename.

Why is my composer not working?

Make sure you have no problems with your setup by running the installer's checks via curl -sS https://getcomposer.org/installer | php -- --check . Try clearing Composer's cache by running composer clear-cache . Ensure you're installing vendors straight from your composer.

Why is composer update so slow?

Composer update is very slow if you have a lot of dependencies/packages implemented. You should avoid variable versions and think about using a HHVM as server.


2 Answers

You can use the following command to clear the cache irrespective of the OS you are on:

php composer.phar clear-cache 

or if composer is installed globally

composer clear-cache 

Hope this helps

like image 67
Atish Goswami Avatar answered Oct 13 '22 23:10

Atish Goswami


I think, you can run your composer commands with --no-cache option flag like

composer install --no-cache 

Or

composer require <package-name> --no-cache 

Or

composer update [<package-name>] --no-cache 
like image 39
Syed Abidur Rahman Avatar answered Oct 13 '22 23:10

Syed Abidur Rahman