refactor(backend): 添加 service 缓存端口
This commit is contained in:
12
backend/internal/service/ports/update_cache.go
Normal file
12
backend/internal/service/ports/update_cache.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package ports
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// UpdateCache defines cache operations for update service
|
||||
type UpdateCache interface {
|
||||
GetUpdateInfo(ctx context.Context) (string, error)
|
||||
SetUpdateInfo(ctx context.Context, data string, ttl time.Duration) error
|
||||
}
|
||||
Reference in New Issue
Block a user