
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
csrkey-cache
Advanced tools
cache wrapper that generates its own cryptographically secure random keys. wraps lru-cache by default. ES5. TypeScript support. 582 bytes gzip.
a cache wrapper that generates its own cryptographically secure random keys.
by default, this module wraps lru-cache.
ES5. TypeScript support. 582 bytes gzip.
import getCache from 'csrkey-cache'
const cache = getCache() // use lru-cache with { max: 1024, maxAge: 15 * 60 * 1000 } defaults
const key = cache.set('Rob says wow!')
cache.has(key) // true
cache.get(key) // 'Rob says wow!'
cache.del(key)
cache.has(key) // false
ES5 and Typescript compatible.
coded in Typescript 3, transpiled to ES5.
main export is the minified version.
if required, e.g. for development in JS without type checks from type declarations,
import resolve-call/index.js instead,
which adds argument type assertion when NODE_ENV !== 'production'.
for a detailed specification of the API, run the unit tests in your browser.
note that lru-cache
is the cache wrapped by default.
see the contribution guidelines
Copyright 2018 Stéphane M. Catala
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and Limitations under the License.
FAQs
cache wrapper that generates its own cryptographically secure random keys. wraps lru-cache by default. ES5. TypeScript support. 582 bytes gzip.
We found that csrkey-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
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.