You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
610 B

package service
import "fmt"
const (
_recPoolTtl = 60
_recPoolKey = "rec_pool_%d"
_recInfoExpireTtl = 86400
_recInfoKey = "rec_info_%d"
_recConfExpireTtl = 86400
_recConfKey = "rec_conf"
)
func (s *Service) getRecPoolKey(id int) (key string, expire int) {
key = fmt.Sprintf(_recPoolKey, id)
expire = _recPoolTtl
return
}
func (s *Service) getRecInfoKey(roomId int) (key string, expire int) {
key = fmt.Sprintf(_recInfoKey, roomId)
expire = _recInfoExpireTtl
return
}
func (s *Service) getRecConfKey() (key string, expire int) {
return _recConfKey, _recConfExpireTtl
}