Skip to content

cache中的DeleteHandler参数问题,看起来像是实现错了 #248

@gukc007

Description

@gukc007

Question

Options的定义
ErrorHandler func(key string, err error)
ChangeHandler func(key string, oldData, newData interface{})
DeleteHandler func(key string, oldData interface{})

ChangeHandler的oldData和newData参数,在代码中代表的是具体的val
https://github.com/bytedance/gopkg/blob/56322a7411cd51804be11e99f2349d290b0ab898/cache/asynccache/asynccache.go#L359C1-L363C4

DeleteHandler中的oldData参数,在代码中代表的是entry
https://github.com/bytedance/gopkg/blob/56322a7411cd51804be11e99f2349d290b0ab898/cache/asynccache/asynccache.go#L322C1-L327C4

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions