mirror of
https://github.com/actions/cache.git
synced 2024-11-15 18:23:51 +08:00
Bump cache limit to 400MB (#61)
This commit is contained in:
parent
e1ed41a9c9
commit
b034b26a44
@ -63,7 +63,7 @@ See [Examples](examples.md)
|
|||||||
|
|
||||||
## Cache Limits
|
## Cache Limits
|
||||||
|
|
||||||
Individual caches are limited to 200MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted.
|
Individual caches are limited to 400MB and a repository can have up to 2GB of caches. Once the 2GB limit is reached, older caches will be evicted based on when the cache was last accessed. Caches that are not accessed within the last week will also be evicted.
|
||||||
|
|
||||||
## Skipping steps based on cache-hit
|
## Skipping steps based on cache-hit
|
||||||
|
|
||||||
|
@ -54,12 +54,12 @@ async function run() {
|
|||||||
core.debug(`Tar Path: ${tarPath}`);
|
core.debug(`Tar Path: ${tarPath}`);
|
||||||
await exec(`"${tarPath}"`, args);
|
await exec(`"${tarPath}"`, args);
|
||||||
|
|
||||||
const fileSizeLimit = 200 * 1024 * 1024; // 200MB
|
const fileSizeLimit = 400 * 1024 * 1024; // 400MB
|
||||||
const archiveFileSize = fs.statSync(archivePath).size;
|
const archiveFileSize = fs.statSync(archivePath).size;
|
||||||
core.debug(`File Size: ${archiveFileSize}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
if (archiveFileSize > fileSizeLimit) {
|
if (archiveFileSize > fileSizeLimit) {
|
||||||
core.warning(
|
core.warning(
|
||||||
`Cache size of ${archiveFileSize} bytes is over the 200MB limit, not saving cache.`
|
`Cache size of ${archiveFileSize} bytes is over the 400MB limit, not saving cache.`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user