function saveCache(paths, key, options, enableCrossOsArchive = false) {
    return __awaiter(this, void 0, void 0, function* () {
        const cacheServiceVersion = (0, config_1.getCacheServiceVersion)();
        core.debug(`Cache service version: ${cacheServiceVersion}`);
        checkPaths(paths);
        checkKey(key);
        switch (cacheServiceVersion) {
            case 'v2':
                return yield saveCacheV2(paths, key, options, enableCrossOsArchive);
            case 'v1':
            default:
                return yield saveCacheV1(paths, key, options, enableCrossOsArchive);
        }
    });
}
Saves a list of files with the specified key

@param paths a list of file paths to be cached
@param key an explicit key for restoring the cache
@param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform
@param options cache upload options
@returns number returns cacheId if the cache was saved successfully and throws an error if save fails