示例#1
0
func NewBindingCache(count int64) *BindingCache {
	cache := common.NewLRUCache(count)
	if cache != nil {
		return &BindingCache{cache: cache}
	}
	return nil
}
示例#2
0
func newWarehouseCache(count int64) *WarehouseCache {
	cache := common.NewLRUCache(count)
	if cache != nil {
		return &WarehouseCache{cache: cache}
	}
	return nil
}
func NewDevicePKManager(host, name string) *DevicePKManager {
	return &DevicePKManager{serviceHost: host, serviceName: name, cache: common.NewLRUCache(MAX_DEVICE_COUNT)}
}