
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
s3-disk-cache
Advanced tools
S3 File Access Abstraction providing Disk Caching Layer. Fork of Lukas Siemon's https://github.com/simlu/s3-cached.git
S3 File Access Abstraction providing Memory and Disk Caching Layer. Useful e.g. in lambda functions if you want to reduce the amount of s3 access for serving (semi-)static files.
$ npm install --save s3-cached
const s3 = require('s3-cached')({
bucket: 'YOUR_BUCKET_NAME',
s3Options: {
accessKeyId: 'YOUR_ACCESS_KEY_ID',
secretAccessKey: 'YOUR_SECRET_ACCESS_KEY'
}
});
s3.getJsonObjectCached('large.json').then((json) => {
// do something with the json data
}).catch((err) => {
// there has been an error
});
getBinaryObjectCached: retrieve file content, caching additional modifications possible through parametergetTextObjectCached: retrieve file content as string and return as promisegetJsonObjectCached: retrieve file content as string, parse as json and return as promisegetDeflatedObjectCached: retrieve file content, deflate and return as promisegetKeysCached: retrieve all file names in bucket with given prefixNote that you can specify the ttl and/or custom bucket on a per file basis by calling
e.g. s3.getJsonObjectCached(FILE_NAME, { ttl, bucket }). For exact method signatures please check the code.
Type: string
Required
Specify the Bucket name you want to retrieve data from.
Type: object
Default: -
Passed into aws-wrap-sdk for AWS.S3() initialization.
Type: logger
Default: null
Passed into aws-wrap-sdk.
Type: integer
Default: 600
Define how long a cached file is kept by default. This can be overwritten on a per-file basis by passing a second parameter into the function.
Type: integer
Default: 100
Define how many cached entities can be hold in memory at the same time. If more entities are present, the earliest are discarded from memory cache.
Type: integer
Default: 469762048
Maximum amount of disk space in bytes used by disk cache. Earliest files are discarded from file cache if more space is used.
Type: string
Default: /tmp
Location to store temporary data for disk cache.
FAQs
S3 File Access Abstraction providing Disk Caching Layer. Fork of Lukas Siemon's https://github.com/simlu/s3-cached.git
We found that s3-disk-cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.