dal

package
v0.0.0-...-671c73a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryUserInfoById

func QueryUserInfoById(ctx context.Context, uid int64) (*model.User, error)

QueryUserInfoById 查询用户信息: 包含基本信息 (目前的场景为只读信息, 而实际情况应该为读多写少) 和计数信息 (经常会变更的数据); 数据查询顺序为先查Redis, 当Redis未命中时查MySQL, MySQL也未命中时使用空值缓存应对Redis缓存穿透问题; 当Redis命中时就更新一次过期时间, 防止出现Redis缓存雪崩的问题

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL