cursor cache disable if not available.
This commit is contained in:
parent
663270b0f5
commit
2204400282
1 changed files with 5 additions and 0 deletions
|
|
@ -60,6 +60,11 @@ func (manager *ImageCtx) Shutdown() {
|
|||
}
|
||||
|
||||
func (manager *ImageCtx) GetCached(serial uint64) (*ImageEntry, error) {
|
||||
// zero means no serial available
|
||||
if serial == 0 {
|
||||
return manager.fetchEntry()
|
||||
}
|
||||
|
||||
manager.cacheMu.Lock()
|
||||
entry, ok := manager.cache[serial]
|
||||
manager.cacheMu.Unlock()
|
||||
|
|
|
|||
Loading…
Reference in a new issue