0.0.3 • Published 5 years ago

@fwd/cache v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Cover

A NodeJS package to simplify in-memory caching.

Install

npm install @fwd/cache

Usage

const cache = require('@fwd/cache')


// storage something
cache('my_unique_key', 'my value')


// get that something
var my_unique_key = cache('my_unique_key') 
console.log(my_unique_key) // my value


// you may also pass an expiration delay as a third parameter
cache('my_unique_key', 'my value', 10000) // 10 seconds in ms


// wait 10 seconds
setTimeout(() => {
	cache('my_unique_key') // undefined
}, 10000) // 10 seconds in ms

👤 Author

Forward Miami

🤝 Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

⭐️ Show your support

Give a star if this project helped you, and help us continue maintaining this project by contributing to it or becoming a sponsor.

Become a sponsor to fwd

📝 License

Copyright © 2020 Forward Miami. This project is Apache-2.0 licensed.

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago