
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
@gibme/cache
Advanced tools
A caching helper that provides a unified interface across multiple cache backends.
npm install @gibme/cache
https://gibme-npm.github.io/cache
import Memory from '@gibme/cache/memory';
const client = new Memory({ stdTTL: 600 });
await client.set('somekey', { some: 'value' });
const value = await client.get('somekey');
if (value) {
console.log(value);
}
await client.disconnect();
Redis configuration can be supplied directly or via environment variables (REDIS_HOST, REDIS_PORT, REDIS_USERNAME, REDIS_PASSWORD).
import Redis from '@gibme/cache/redis';
const client = new Redis({
host: 'localhost',
username: 'someuser',
password: 'somepassword'
});
await client.set('somekey', { some: 'value' });
const value = await client.get('somekey');
if (value) {
console.log(value);
}
await client.disconnect();
import Database from '@gibme/cache/database';
const client = new Database({
stdTTL: 600,
tableName: 'cache'
});
await client.connect();
await client.set('somekey', { some: 'value' });
const value = await client.get('somekey');
if (value) {
console.log(value);
}
await client.disconnect();
All backends implement the same abstract Cache interface:
| Method | Description |
|---|---|
set(key, value, ttl?) | Store a value with optional TTL (seconds) |
get(key) | Retrieve a value |
del(key) | Delete a key |
includes(key) | Check if a key exists |
take(key) | Get a value and delete it in one operation |
mset(keys, values, ttl?) | Set multiple key/value pairs |
mget(keys) | Get multiple values |
mdel(keys) | Delete multiple keys |
keys() | List all keys |
list() | Get all entries as a Map |
clear() | Delete all entries |
ttl(key, ttl) | Update a key's TTL |
getTtl(key) | Get remaining TTL in seconds |
connect() | Establish backend connection |
disconnect() | Close backend connection |
isReady | Whether the backend is connected |
MIT
FAQs
A caching helper wrapped around various cache types
The npm package @gibme/cache receives a total of 0 weekly downloads. As such, @gibme/cache popularity was classified as not popular.
We found that @gibme/cache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.