Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@gat-solutions/redis
Advanced tools
$ npm install @gat-solutions/redis
//Host của redis write
REDIS_WRITE_HOST=
//Port của redis write
REDIS_WRITE_PORT=
//Password của redis write
REDIS_WRITE_PASSWORD=
//DB index của redis write
REDIS_WRITE_DB=
//Host của redis read
REDIS_READ_HOST=
//Port của redis read
REDIS_READ_PORT=
//Password của redis read
REDIS_READ_PASSWORD=
//DB index của redis read
REDIS_READ_DB=
import { RedisService } from "@gat-solutions/redis"
const redisService = new RedisService();
// Lưu data với thời gian 60s
redisService.set("KEY:ABC", "DEF", 60); //60s
// Lưu data vô thời hạn
redisService.setNx("KEY:ABC", "DEF"); //60s
// Lấy data từ redis
const data = await redisService.get("KEY:ABC");
if (!data){
throw new Error("Not found data")
}
console.log(data) //"DEF"
// Xóa data
redisService.del("KEY:ABC")
// Lấy danh sách key
const keys = await redisService.keys("KEY")
console.log(keys) //["ABC"]
FAQs
Custom IORedis for GAT
The npm package @gat-solutions/redis receives a total of 6 weekly downloads. As such, @gat-solutions/redis popularity was classified as not popular.
We found that @gat-solutions/redis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.