You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following error was observed when diskCache.get() was called at a frequency of around 50 per second. At lower rates like 5 to 10 per second we never observed the error.
[Error: ENOENT: no such file or directory, open '/tmp/diskcache/cache_99e4ffff-6392-45b1-ba69-21786819c784.dat'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/tmp/diskcache/cache_99e4ffff-6392-45b1-ba69-21786819c784.dat'
}
Following cache-manager code used in an AWS Lambda.
The following code was being used when the error above was encountered.
diskCache.get("SOME KEY FOR CACHE", function (err, result) {
if (err) {
console.error({ error: err, result: result });
} else if (result) {
// do something based on result from cache
} else {
var args = {
"Bucket": "SOME AWS S3 BUCKET",
"Key": "SOME AWS S3 KEY"
};
s3.getObject(args, function (err, data) {
if (err) {
console.error({ error: err, data: data });
} else {
var json = data.Body.toString("ascii");
diskCache.set("SOME KEY FOR CACHE", json);
// do something based on result from cache
}
});
}
});
Changing to the following will address and work-around the odd occurrence of the error, however we figured we'd raise this incase we're not using cache-manager correctly.
diskCache.get("SOME KEY FOR CACHE", function (err, result) {
if (result) {
// do something based on result from cache
} else {
if (err) {
console.error({ error: err, result: result });
}
var args = {
"Bucket": "SOME AWS S3 BUCKET",
"Key": "SOME AWS S3 KEY"
};
s3.getObject(args, function (err, data) {
if (err) {
console.error({ error: err, data: data });
} else {
var json = data.Body.toString("ascii");
diskCache.set("SOME KEY FOR CACHE", json);
// do something based on result from cache
}
});
}
});
The text was updated successfully, but these errors were encountered:
The following error was observed when diskCache.get() was called at a frequency of around 50 per second. At lower rates like 5 to 10 per second we never observed the error.
Following cache-manager code used in an AWS Lambda.
The following code was being used when the error above was encountered.
Changing to the following will address and work-around the odd occurrence of the error, however we figured we'd raise this incase we're not using cache-manager correctly.
The text was updated successfully, but these errors were encountered: