예제 #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
}
예제 #3
0
func NewDevicePKManager(host, name string) *DevicePKManager {
	return &DevicePKManager{serviceHost: host, serviceName: name, cache: common.NewLRUCache(MAX_DEVICE_COUNT)}
}