mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-03 16:59:12 +02:00
cursor cache log debug.
This commit is contained in:
parent
5d00e0bdbd
commit
a8e44160dc
1 changed files with 2 additions and 0 deletions
|
@ -65,6 +65,7 @@ func (manager *ImageCtx) Shutdown() {
|
|||
func (manager *ImageCtx) GetCached(serial uint64) (*ImageEntry, error) {
|
||||
// zero means no serial available
|
||||
if serial == 0 || serial > manager.maxSerial {
|
||||
manager.logger.Debug().Uint64("serial", serial).Msg("cache bypass")
|
||||
return manager.fetchEntry()
|
||||
}
|
||||
|
||||
|
@ -85,6 +86,7 @@ func (manager *ImageCtx) GetCached(serial uint64) (*ImageEntry, error) {
|
|||
manager.cache[serial] = entry
|
||||
manager.cacheMu.Unlock()
|
||||
|
||||
manager.logger.Debug().Uint64("serial", serial).Msg("cache miss")
|
||||
return entry, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue