-
Notifications
You must be signed in to change notification settings - Fork 218
feat: added redis store #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
Thank you for this! It's much needed because if you run stuff in a VPC then you have to deal with finding a way to get your auth server and dynamo to work. With Redis, it's no problem. I think the contract has changed since you put in the PR. I needed to add this to make it work: async set(key: string[], value: any, expiry?: Date) {
// Calculate TTL in seconds if expiry date is provided
const ttl = expiry
? Math.max(0, Math.floor((expiry.getTime() - Date.now()) / 1000))
: undefined;As for connecting (if you are using elasticache) make sure to set TLS to storage: RedisStorage({
username: Resource.Redis.username,
password: Resource.Redis.password,
host: Resource.Redis.host,
port: Resource.Redis.port,
...(IS_LOCAL ? {} : { tls: {} }),
}), |
|
FYI, I've merged this into a fork with @mwood23's changes and tested it and it works nicely. |
|
Yeah, I opened this PR a long time ago. Since then, I guess the API has been refactored. I've also been a bit busy with other things. It would be great if someone could open a new PR with these updated changes. |
|
Does this support Upstash Redis? It uses its own client package, not node-redis |
Fix possible args too long issue
| "@types/node": "22.10.1", | ||
| "arctic": "2.2.2", | ||
| "hono": "4.6.9", | ||
| "ioredis": "5.4.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should prob be in "dependencies"
Closes #37