
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@opuscapita/cache
Advanced tools
Cache library for OpusCapita. By default it ships with three cache providers: dummy, memory and redis.
To have a look at the full API, please visit the related wiki page.
First got to your local code directory and run:
npm install @opuscapita/cache
If you are using the redis back-end, you'll need to have access to a running Consul server to get your endpoint configuration and a Redis server to connect to.
If all this is set up, go to you code and add the following command:
const Cache = require('@opuscapita/cache');
var cache = new Cache(); // using default: Memory driver
cache.put('hello', 'world').then(() => cache.get('hello')).then(console.log);
The default configuration object provides hints about what the module's standard behavior is like. In order to set plug-in (driver) specific configurations, you may add a sub-key to the configuration having the same name as the driver property you set and assign a configuration object there.
{
driver : 'memory',
keyPrefix: '',
defaultExpire: 600, // in seconds
pluginDirectory: 'plugins'
}
Example including memory driver configuration:
const Cache = require('@opuscapita/cache');
var cache = new Cache({
driver : 'memory',
keyPrefix: '',
checkPeriod: 10,
memory: {
checkPeriod: 600,
useClones: true
},
redis: {
consul: {
host: 'consul'
},
redis: {
endpointName: 'redis',
passwordKey: 'redis/password' // consul KV key name
}
}
});
If environment variable KUBERNETES_SERVICE_DISCOVERY is set then config library is not used at all for service discovery. Redis port is read from REDIS_PORT environment variable (6379 is used by default if variable not set).
There is a feature? which cause redis/redis/ path in the configuration... In the future version this shall change
{
driver: "redis",
redis: {
consul: {
host: "consul"
serviceSecretPath: '/path'
port:8500,
retryCount: 50,
retryTimeout: 1000,
logger: null,
},
redis: {
endpointName: "redis",
passwordKey: "redis/password",
},
},
}
Added new option to change redis retry interval and count.
FAQs
OpusCapita cache abstraction library
We found that @opuscapita/cache demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.