Files
herolib/lib/clients/redisclient/readme.md
2024-12-25 09:23:31 +01:00

20 lines
426 B
Markdown

# Redisclient
## basic example to connect to local redis on 127.0.0.1:6379
```v
import freeflowuniverse.herolib.clients.redisclient
mut redis := redisclient.core_get()!
redis.set('test', 'some data') or { panic('set' + err.str() + '\n' + c.str()) }
r := redis.get('test')?
if r != 'some data' {
panic('get error different result.' + '\n' + c.str())
}
```
> redis commands can be found on https://redis.io/commands/