Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于cache部分lfu的判定问题 #60

Open
LR0 opened this issue Mar 19, 2023 · 0 comments
Open

关于cache部分lfu的判定问题 #60

LR0 opened this issue Mar 19, 2023 · 0 comments

Comments

@LR0
Copy link

LR0 commented Mar 19, 2023

cache的s2lru组建中的这段代码:

// 如果 stageOne 没满,整个 LFU 区域也没满
	if slru.stageOne.Len() < slru.stageOneCap || slru.Len() < slru.stageOneCap+slru.stageTwoCap {
		slru.data[newitem.key] = slru.stageOne.PushFront(&newitem)
		return
	}

这里为什么允许stageOne满的情况往stageOne中加数据?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant