Files
mtusi2026lab2/internal/service/cache.go
T
Vladislav Agapov b90581f613
Application / verify (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
Implement lab 2 with PostgreSQL, Valkey admission and Helm deployment
2026-10-15 17:09:26 +03:00

18 lines
514 B
Go

package service
import (
"context"
"github.com/google/uuid"
"gitea.privcloud.tech/vlad_marlo/mtusi2026lab2/internal/model/dto"
)
// ProfileCache stores immutable public account profiles; misses fall back to PostgreSQL.
type ProfileCache interface {
// GetProfile returns a cached profile or a miss, including on backend failure.
GetProfile(context.Context, uuid.UUID) (dto.UserDTO, bool)
// PutProfile stores a bounded-lifetime profile on a best-effort basis.
PutProfile(context.Context, dto.UserDTO)
}