
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
@dbbs/next-cache-handler
Advanced tools
This package was deprecated. Use @dbbs/next-cache-handler-core instead.
next-cache-handler is designed to elevate the performance of Next.js applications by providing a robust caching solution that adapts to cookies, query parameters, and device types. This enables the delivery of content that is finely tuned to the context of each user, significantly improving load times and user experience.
Ensure you have Node.js version 12 or higher installed.
npm i -s next-cache-handler
# or
yarn add next-cache-handler
Create a cacheHandler.js in your project and configure as follows:
import { CacheHandler, FileSystemCache } from 'next-cache-handler'
CacheHandler
.setCacheStrategy(new FileSystemCache())
.addCookie('my-cookie-1')
.addCookie('my-cookie-2')
.addQuery('my-query-1')
.addQuery('my-query-2')
.addDeviceSplit()
// Additional configuration...
export default CacheHandler
Update your next.config.js to use the cache handler.
const nextConfig = {
cacheHandler: require.resolve('./cacheHandler.js')
}
export default nextConfig
Explore various caching strategies to find the best fit for your application's needs:
import { CacheHandler, MemoryCache } from 'next-cache-handler'
CacheHandler.setCacheStrategy(new MemoryCache())
import { CacheHandler, MemoryCache } from 'next-cache-handler'
// extending size limitation to 1024MB.
CacheHandler.addStrategy(new MemoryCache({ sizeLimit: 1024 }))
import { CacheHandler, FileSystemCache } from 'next-cache-handler'
CacheHandler.setCacheStrategy(new FileSystemCache())
import { CacheHandler, RedisCache } from 'next-cache-handler'
// list of all accepted redis connection options.
const redisConnectionOpts = {
url: 'redis://localhost:5843',
...
}
CacheHandler.setCacheStrategy(new RedisCache(redisConnectionOpts))
addCookieCookie name what is going to be used to fragmentate cache based on browser cookies session.
CacheHandler.addCookie('my-cookie-to-split')
addQueryQuery name to fragmentate cache based on url query parameters.
CacheHandler.addQuery('my-query-to-split')
addDeviceSplitEnables to fragmentate experience based on current User-Agent of the request.
CacheHandler.addDeviceSplit()
setCacheStrategyApplies given strategy to cache page data.
CacheHandler.setCacheStrategy(new MemoryCache())
addNoCacheRouteAdd route to ignore cache list. All routes added here would be excluded from caching and will always render again.
Leverage the built-in logger for monitoring cache operations or integrate your custom logger for advanced logging capabilities.
import { BaseLogger, CacheHandler, FileSystemCache } from 'next-cache-handler'
class MyCustomLogger implements BaseLogger {
constructor() {}
info(data) {
console.log(data)
}
error(data) {
console.error(data)
}
}
CacheHandler.setCacheStrategy(new FileSystemCache(new MyCustomLogger()))
The next-cache-handler is open-source software licensed under the MIT License.
We value your feedback and contributions to the next-cache-handler. If you have any questions or suggestions or need support, here are several ways to get in touch with us:
General Inquiries and Support: For any general questions about the platform or if you need assistance, please visit our website DBB Software and use the contact form provided.
GitHub Issues: For specific issues, feature requests, or bugs related to the platform, please use the GitHub Issues page. This is the fastest way to directly communicate with our development team and track the resolution of your issue.
Community Discussion and Contributions: Join our community discussions on GitHub Discussions for broader topics, ideas exchange, and collaborative discussions.
Social Media: Follow us on our social media channels for the latest news, updates, and insights:
Email Contact: For more formal or detailed inquiries, feel free to reach out to us via email at in@dbbsoftware.com.
We're always here to help and are committed to ensuring you have the best experience with the next-cache-handler. Your input and participation drive the continuous improvement of our platform.
FAQs
Support to control cache behaviour for NextJS applications.
We found that @dbbs/next-cache-handler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.