Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@directus/memory
Advanced tools
@directus/memory
Directus has various different needs for ephemeral storage that's synced between multiple processes for the same Directus Projects. To streamline that setup, this package exports three classes that are used for everything related to ephemeral storage:
The Kv class is a simple key-value store
import { createKv } from '@directus/memory';
const cache = createKv({
type: 'memory',
});
await cache.set('my-key', 'my-value');
The cache class is a Kv class extended with an LRU store
import { createCache } from '@directus/memory';
const cache = createCache({
type: 'memory',
maxKeys: 500,
});
await cache.set('my-key', 'my-value');
The bus class is a pub-sub abstraction. The memory type bus just handles local handlers, which adds no benefit next to having a shared API for using pubsub.
import { Redis } from 'ioredis';
import { createBus } from '@directus/memory';
const bus = createBus({
type: 'redis',
redis: new Redis(),
namespace: 'directus',
});
The limiter class is a basic shared rate limiter.
import { createLimiter } from '@directus/memory';
const limiter = createLimiter({
type: 'memory',
points: 10,
duration: 5,
});
FAQs
Memory / Redis abstraction for Directus
We found that @directus/memory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.