Prime CI Cache

I am trying to speed up our pipeline.

So far I have done the following:

install:php:
image: someimage
stage: install
script:
- composer install
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- vendor/
only:
changes:
- composer.json

This would work great, but the cache is empty. I can remove the “only” block but that defeats the purpose. My question is how do I prime this? Is there a way to test the cache and run if the cache is not set?