fix(backend): don't hardcode redis URL, add redis to docker compose

This commit is contained in:
sam 2025-03-04 17:25:07 +01:00
parent 7759225428
commit f99d10ecf0
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
2 changed files with 10 additions and 3 deletions

View file

@ -24,8 +24,7 @@ namespace Foxnouns.Backend.Services;
public class KeyCacheService(Config config)
{
public ConnectionMultiplexer Multiplexer { get; } =
// ConnectionMultiplexer.Connect(config.Database.Redis);
ConnectionMultiplexer.Connect("127.0.0.1:6379");
ConnectionMultiplexer.Connect(config.Database.Redis);
public async Task SetKeyAsync(string key, string value, Duration expireAfter) =>
await Multiplexer