Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCacheMissed = errors.New("cache missed") ErrNoAvailablePerson = errors.New("no available selectedPersons in DB") )
Functions ¶
This section is empty.
Types ¶
type InferDao ¶
type InferDao struct {
// contains filtered or unexported fields
}
func NewInferDao ¶
func NewInferDao(formats resource.FileFormats) *InferDao
func (*InferDao) SetInferRes ¶
func (in *InferDao) SetInferRes(ctx *kernel.RequestContext, data []byte, rkgPersons []*face_rkg.RecognizedPerson)
type PersonDao ¶
type PersonDao struct {
// contains filtered or unexported fields
}
func NewPersonDao ¶
func NewPersonDao(formats resource.FileFormats) *PersonDao
func (*PersonDao) LoadPersons ¶
LoadPersons pulls the person data, consisting of three main steps:
(1) pull all the pids from redis to get the pids that are not in the local cache.
(2) the local cache data will be returned directly if all the pid local caches are available
(3) otherwise, pull the data corresponding to the new pid from redis. if there are all new pid data in Redis, update the local cache and return data otherwise, pull the new pid data that is not in Redis from MySQL, update Redis as well as local cache, and return data.
Click to show internal directories.
Click to hide internal directories.