Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
cloudbase-accesstoken-cache
Advanced tools
cloudbase-accesstoken-cache , use cloudbase database to manager your accesstoken easily !
轻松快捷的管理您的 Access Token
import { init } from '@cloudbase/node-sdk'
import { SingleCacheManager } from 'cloudbase-accesstoken-cache'
const app = init({
secretId,
secretKey,
env
})
const db = app.database()
const manager = new SingleCacheManager({
appid,
db,
secret
})
// 这就是你的 token 带了一套缓存机制
const token = await manager.getAccessToken()
const tcb = require('@cloudbase/node-sdk')
const { SingleCacheManager } = require('cloudbase-accesstoken-cache')
const app = tcb.init({
secretId,
secretKey,
env
})
const db = app.database()
const manager = new SingleCacheManager({
appid,
db,
secret
})
// 这就是你的 token 带了一套缓存机制
const token = await manager.getAccessToken()
都可以通过 .d.ts
定义感知出来
有 2
种策略,通过构造方法的 memoize
配置项开启 ,default: true
开启后会在内存中同步缓存,相当于一套 2 级缓存机制,顺序为:
不开启的策略为:
如果你有更复杂的需求,请提 issue
FAQs
cloudbase-accesstoken-cache , use cloudbase database to manager your accesstoken easily !
The npm package cloudbase-accesstoken-cache receives a total of 0 weekly downloads. As such, cloudbase-accesstoken-cache popularity was classified as not popular.
We found that cloudbase-accesstoken-cache 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.