![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.
@forgerock/openam-agent-cache-mongodb
Advanced tools
Cache using MongoDB for the OpenAM Policy Agent for NodeJS
Cache using MongoDB for the OpenAM Policy Agent for NodeJS
Installation: npm install @forgerock/openam-agent-cache-mongodb
Cache
Kind: global class
Extends: Cache
Cache
Promise
Promise
Promise
Promise
Promise
Cache implementation for MongoDB
Param | Type | Default | Description |
---|---|---|---|
[options] | object | Options | |
[options.url] | string | "http://localhost/openam-agent" | MongoDB URL |
[options.expireAfterSeconds] | number | 60 | Expiration time in seconds |
[options.collectionName] | string | "agentcache" | MongoDB collection name |
Example
var mongoCache = new MongoCache({
url: 'mongodb://db.example.com/mydb',
expireAfterSeconds: 600,
collectionName: 'sessions'
});
Promise
Get a single cached item If the entry is not found, reject
Kind: instance method of MongoCache
Param | Type |
---|---|
key | string |
Example
mongoCache.get('foo').then(function (cached) {
console.log(cached);
}).catch(function (err) {
console.error(err);
});
Promise
Store a single cached item (overwrites existing)
Kind: instance method of MongoCache
Param | Type |
---|---|
key | string |
value | * |
Example
mongoCache.put('foo', {bar: 'baz'}).then(function () {
console.log('foo saved to cache');
}).catch(function (err) {
console.error(err);
});
Promise
Remove a single cached item
Kind: instance method of MongoCache
Param | Type |
---|---|
key | string |
Example
mongoCache.remove('foo').then(function () {
console.log('foo removed from cache');
}).catch(function (err) {
console.error(err);
});
Promise
Closes the database connection
Kind: instance method of MongoCache
Example
mongoCache.close().then(function () {
console.log('cache closed');
});
Promise
Closes the database connection
Kind: instance method of MongoCache
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. ForgeRock does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in production configurations.
ForgeRock does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. ForgeRock disclaims all warranties, expressed or implied, and in particular, disclaims all warranties of merchantability, and warranties related to the code, or any service or software related thereto.
ForgeRock shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
FAQs
Cache using MongoDB for the OpenAM Policy Agent for NodeJS
The npm package @forgerock/openam-agent-cache-mongodb receives a total of 1 weekly downloads. As such, @forgerock/openam-agent-cache-mongodb popularity was classified as not popular.
We found that @forgerock/openam-agent-cache-mongodb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.