Upstash redis client for vals.

Creates a global redis instance and exposes functions to use it.

To use, create a redis database on Upstash and set the environment variables.

  • UPSTASH_REDIS_REST_URL
  • UPSTASH_REDIS_REST_TOKEN

Val.town runs in ohio so the best region to pick for the redis instance is probably us-east-1.

Calls are also traced via https://www.val.town/v/saolsen/tracing so if you use that library you will see timed spans for any redis calls.

For an example of how to use it see https://www.val.town/v/saolsen/try_redis

Migrated from folder: lib/redis