
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
volos-cache-common
Advanced tools
This module adds support for caching to any API.
This module does not do anything on its own -- it depends on an implementation which stores the cache in a particular place. Current implementations are:
var cm = require('volos-cache-memory');
var cache = cm.create('name', { ttl: 1000 }); // specifies default ttl as 1000 ms
cache.set('key', 'value');
cache.get('key', callback);
Note: Avoid creating multiple caches with the same name, the results are not defined by the interface and may vary by implementation.
Sets a value into the cache.
Gets a value from the cache.
Deletes a value from the cache.
Clears all values from the cache.
Set the text encoding for values retrieved from the cache. The value will be returned as a String in the specified encoding. If this function is never called, then values will always be returned as Buffers.
Caches "GET" requests and their headers.
Parameters:
Returns middleware that may be used in a Connect server.
server
.use(cache.connectMiddleware().cache())
.get('/',
function(req, resp) {
...
Returns middleware that may be used in a Express server.
server
.use(cache.expressMiddleware().cache())
.get('/',
function(req, resp) {
...
Returns middleware that may be used in an Argo server.
server
.use(cache.argoMiddleware().cache())
.get('/',
function(handle) {
handle('request', function(env, next) {
...
FAQs
Basic caching library for the Volos system.
The npm package volos-cache-common receives a total of 227 weekly downloads. As such, volos-cache-common popularity was classified as not popular.
We found that volos-cache-common 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.