mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: project organization details (#17339)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -71,3 +71,10 @@ func (cm *SCacheManager[T]) fetchCacheFromDB() error {
|
||||
func (cm *SCacheManager[T]) Update(obj *T) {
|
||||
cm.cache.Store((*obj).GetId(), obj)
|
||||
}
|
||||
|
||||
func (cm *SCacheManager[T]) Range(proc func(key interface{}, value interface{}) bool) {
|
||||
if cm.cache == nil {
|
||||
cm.fetchCacheFromDB()
|
||||
}
|
||||
cm.cache.Range(proc)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user