This PR adds a new option :warm to the Cachex.warm/2 command which allows the user to specify whether they want to wait for all warmers to complete, or spawn the warming asynchronously.
This also allows us to re-use Cachex.warm/2 in the cache startup sequence, instead of re-implementing warming details there. The implementation now uses Task, which I'm not totally sure about, but I think it's better than running synchronous warmers one by one.
This fixes #336.
This PR adds a new option
:warm
to theCachex.warm/2
command which allows the user to specify whether they want to wait for all warmers to complete, or spawn the warming asynchronously.This also allows us to re-use
Cachex.warm/2
in the cache startup sequence, instead of re-implementing warming details there. The implementation now usesTask
, which I'm not totally sure about, but I think it's better than running synchronous warmers one by one.