Skip to content

优化状态存储方式从而避免内存无限制增加 #2

@MiddleRed

Description

@MiddleRed

当前 limiter 存储状态的方法是所有条目都放入一个 dict 中,并且不会清除其中条目数据(即使已经恢复完毕/长久未用),这会导致服务众多用户的时候造成占用内存无限增加。
考虑引入LRU机制和冷读取,对于许久未更新的使用数据提供选项丢弃还是冷存于本地。

目前为了防止这种情况发生,请用户尽量使用宽泛的字段(如 UserScopeSceneScope),减少可能的内存占用。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions