New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@henrikvolmer/nextjs-cache-handler-s3

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@henrikvolmer/nextjs-cache-handler-s3

NextJS shared cache handler for AWS S3

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
179
increased by40.94%
Maintainers
0
Weekly downloads
 
Created
Source

Next.js Cache Handler with AWS S3

This library provides a cache handler for Next.js applications using AWS S3 as the storage backend. It leverages the @aws-sdk/client-s3 for interacting with S3 and @neshca/cache-handler for cache management.

Features

  • AWS S3 Integration: Store and retrieve cache data from AWS S3.
  • MD5 Hashing: Generate MD5 hashes for cache keys.
  • Tagging Support: Tag cache objects for efficient revalidation and deletion.
  • Cache Expiration: Set cache expiration using CacheControl.

Installation

Install the package using npm:

npm install @henrikvolmer/nextjs-cache-handler-s3

Configuration

next.config.js:

module.exports = {
    cacheHandler:
        process.env.NODE_ENV === "production"
            ? require.resolve("@henrikvolmer/nextjs-cache-handler-s3")
            : undefined,
};

Necessary environment variables:

AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
CACHE_BUCKET_NAME=your-s3-bucket
CACHE_PREFIX=some-prefix

Keywords

FAQs

Package last updated on 28 Aug 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc