The global cache may be beneficial to persist and re-use across targets, at least for the same target platform. Perhaps a persistent worker could facilitate this.
Consider whether the local cache should be shared across actions. If not, consider discarding it immediately.