![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
hapi-cache-manager
Advanced tools
Manage your Hapi catbox cache through REST endpoints and server methods.
Hapi Cache Manager plugin
Manage your Catbox cache through REST endpoints and server methods.
namespace
- (Default: cache
) Namespace for methods registered by the plugin.dependencies
- (Default: []
) An array of plugin name strings that must be registered before cache managerinvalidate
- Cache invalidation options object
path
- (Default: /cache/invalidate
) Server endpoint to expose through DELETE methodauth
- (Default: false
) Hapi auth strategy to use for cache invalidation endpointstatistics
- Cache statistics options object
path
- (Default: /cache/statistics
) Server endpoint to expose through GET methodauth
- (Default: false
) Hapi auth strategy to use for cache statistics endpointconst Hapi = require('hapi');
const CacheManager = require('hapi-cache-manager');
const server = new Hapi.Server();
server.connection({ port: 3000 });
server.register({
register: CacheManager,
options: { // default options
namespace: 'cache', // server methods namespace
dependencies: [], // plugin dependencies
invalidate: {
path: 'cache/invalidate', // cache invalidation endpoint
auth: false // cache invalidation auth strategy
},
statistics: {
path: 'cache/statistics', // cache invalidation endpoint
auth: false // cache invalidation auth strategy
}
}
}, (err) => {
if (err) {
throw err;
}
});
server.start((err) => {
if (err) {
throw err;
}
console.log('Server started');
});
You can get cache statistics for a single method or for all methods registered on the server:
# get statistics for all methods
curl http://localhost:3000/cache/statistics
# {
# 'somemethod': {
# sets: 0, gets: 2, hits: 1, stales: 0, generates: 1, errors: 0
# },
# 'someothermethod': { ... } }
# get statistics for a single method
curl http://localhost:3000/cache/statistics\?name\=somemethod
# {
# sets: 0, gets: 3, hits: 2, stales: 0, generates: 1, errors: 0
# }
You can drop as many cached keys for as many methods as you want with either a single external request or internally by calling a server method.
const payload = {
data: [
{ name: 'methodname', keys: ['blabla', '123'] },
{ name: 'someothermethodname', keys: ['abc'] },
{ ... }
]
};
// through REST
server.inject({ method: 'DELETE', url: '/cache/invalidate', payload: payload }, (res) => {
console.log(res.statusCode)
// 204
console.log(res.payload == '');
// true
});
// through server method
server.methods.cache.invalidate(payload, (err, res) => {
});
MIT Public License.
FAQs
Manage your Hapi catbox cache through REST endpoints and server methods.
The npm package hapi-cache-manager receives a total of 4 weekly downloads. As such, hapi-cache-manager popularity was classified as not popular.
We found that hapi-cache-manager 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.