16 Commits (d036b2390ec18a78fc00f736ba8a08718afcf431)

Author SHA1 Message Date
Michael Kühn 5b7e39e919 fixed: dead symlink breaks gc 10 years ago
Guillaume LECERF 44fd75ef38 Fix Cache::gc() when COMPOSER_CACHE_DIR=/dev/null
If we set COMPOSER_CACHE_DIR=/dev/null, and the garbage collector
is triggered, we end up with the following error :

The "/dev/null/" directory does not exist.

This is because the Cache::gc() function does not check for Cache::enabled
and instanciates a Finder unconditionnaly.

Fix this by adding a check on Cache::enabled.
11 years ago
user a956ce9bb1 Use 'cache-files-ttl' for cache gc, fixes #2441
The configuration option 'cache-ttl' was used instead of 'cache-files-ttl' to determine
whether or not a cache gc should be performed.

* changed 'cache-ttl' to 'cache-files-ttl' to determine if a gc should be performed
* refactored FileDownloader to allow for easier testing
* added test to ensure that the gc is called with the proper config option
11 years ago
Jordi Boggiano 8d0b7f278e CS fixes 11 years ago
Jordi Boggiano 950fc7e66e Add debug output to cache class 11 years ago
Jordi Boggiano 514a3cde77 CS fixes 12 years ago
Galymzhan 219b489d01 add size-based limit for files cache, fixes #1321 12 years ago
Jordi Boggiano 07f7487c60 Clear cached files when they fail to extract or validate, refs #941 12 years ago
Jordi Boggiano 15475f0ef2 Rename cache dirs to consolidate them by purpose 12 years ago
Jordi Boggiano 5a9d986e67 Implement cache GC and fix keys 12 years ago
Jordi Boggiano 79bf55e505 Standardize return valuse of the cache class 12 years ago
Jordi Boggiano fb3a43b2f0 Add local cache to dist downloads 12 years ago
Jordi Boggiano 07f72e9fb6 Add support for provider listings 12 years ago
Jordi Boggiano 6d1377838b Handle weird chars in cache keys 12 years ago
Jordi Boggiano fc29487a2a Add home config key and use it to create the cache instance 12 years ago
Jordi Boggiano 0d97ec4783 Add cache to the composer repositories 12 years ago