![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@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
The npm package @opuscapita/cache receives a total of 188 weekly downloads. As such, @opuscapita/cache popularity was classified as not popular.
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.
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.