diff --git a/.travis.yml b/.travis.yml
index 5885f0b27926de74865b8641a9c697262ad65c76..a7efddd875217294ebd2dc52a1994f68bfe3f3ce 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,8 +23,16 @@ matrix:
 before_install:
   - sudo apt-get update -qq
   - sudo apt-get install -y -qq postfix
-  - sh -c "if [ -x $HOME/.cache/bin/composer ]; then $HOME/.cache/bin/composer self-update; echo ''; else  mkdir -p $HOME/.cache/bin; curl --connect-timeout 30 -sS 'https://getcomposer.org/installer' | php -- --install-dir $HOME/.cache/bin/ --filename composer; fi"
-  - $HOME/.cache/bin/composer --version
+  - sh -c 'if [ "$CASHER_DIR" ]; then
+         if [ -x $HOME/.cache/bin/composer ]; then
+           $HOME/.cache/bin/composer self-update; echo '';
+         else
+           mkdir -p $HOME/.cache/bin;
+           curl --connect-timeout 30 -sS https://getcomposer.org/installer \
+           | php -- --install-dir $HOME/.cache/bin/ --filename composer;
+         fi
+       fi'
+  - export PATH="$HOME/.cache/bin:$PATH"
 before_script:
   # Mock mail
   - sudo service postfix stop
@@ -53,7 +61,7 @@ before_script:
   # Change memory_limit for travis
   - echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
   - phpenv rehash;
-  - $HOME/.cache/bin/composer install --no-interaction --prefer-dist
+  - composer install --no-interaction --prefer-dist
 script:
   # Unit tests
   - sh -c "if [ '$TEST_SUITE' = 'unit' ]; then ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist; fi"
@@ -66,4 +74,4 @@ script:
   # Static tests [Code Style]
   - sh -c "if [ '$TEST_SUITE' = 'static_phpcs' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testCodeStyle'; fi"
   # Static tests [Code Style]
-  - sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"
\ No newline at end of file
+  - sh -c "if [ '$TEST_SUITE' = 'static_annotation' ]; then cd dev/tests/static; ./../../../vendor/bin/phpunit -c phpunit.xml.dist --filter 'Magento\\\\Test\\\\Php\\\\LiveCodeTest::testAnnotationStandard'; fi"