https://github.com/superfly/redis-cache-example
https://github.com/superfly/redis-cache-example
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/superfly/redis-cache-example
- Owner: superfly
- License: apache-2.0
- Created: 2019-12-17T23:30:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T23:35:37.000Z (over 5 years ago)
- Last Synced: 2025-03-07T01:18:45.866Z (3 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Redis cache example
This is a simple app written in go that connects to the fly redis cache defined in the FLY_REDIS_CACHE_URL env variable. It shows how to get, set, and delete cached data using the request path as the key.
**Setting data**
```bash
curl -XPOST -d "Michael" https://go-redis-cache-example.fly.dev/name
```**Getting data**
```bash
curl https://go-redis-cache-example.fly.dev/name
```**Deleting data**
```bash
curl -XDELETE https://go-redis-cache-example.fly.dev/name
```