Skip to main content

@nimpl/cache-in-memory

(Former next-impl-cache-in-memory )

Base cacheHandler for next.js, which cache data in-memory

Installation 

Using npm:

npm i @nimpl/cache-in-memory

Usage 

You can use cacheHandler by specifying the path to it in the application configuration:

/** @type {import('next').NextConfig} */
const nextConfig = {
cacheMaxMemorySize: 0,
cacheHandler: require.resolve('@nimpl/cache-in-memory'),
};

However, it is recommended to use it together with @nimpl/cache-adapter . The package will allow you to expand the capabilities of cacheHandler and also reuse the cache between different application instances.

Examples 

Base example .

Development 

Read about working on the package and making changes on the contribution page 

Additional 

Please consider giving a star if you like it, it shows that the package is useful and helps continue work on this and other packages.

Create issues with wishes, ideas, difficulties, etc. All of them will definitely be considered and thought over.

Previous
Cache Adapter
Return to navigation