mirror of
https://github.com/stCarolas/setup-maven.git
synced 2026-10-02 09:31:32 +00:00
change url to archive mirror
This commit is contained in:
1 parent
fbb2b0cc60
commit
66602c7280
690 files changed
+1017813
-2
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
//
|
||||
'use strict';
|
||||
|
||||
function cacheWrapper (cache , key , fn ) {
|
||||
if (!cache) {
|
||||
return fn();
|
||||
}
|
||||
|
||||
const cached = cache.get(key);
|
||||
if (cached !== undefined) {
|
||||
return cached;
|
||||
}
|
||||
|
||||
const result = fn();
|
||||
cache.set(key, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = cacheWrapper;
|
||||
Reference in new issue
Block a user