dgraph-io / ristretto

A high performance memory-bound Go cache

Home Page:https://dgraph.io/blog/post/introducing-ristretto-high-perf-go-cache/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cache Set() should return error instead of bool

Dentrax opened this issue · comments

Sorry for the issue, i just saw GitHub Issues are deprecated. But unfortunately discuss.dgraph.io requires sign-in, in order to open an issue. Time is so valuable to create a issue on another site whereas source code is not there. I think this is bad practice.

Currently, Set() function returns bool:

func (c *Cache) Set(key, value interface{}, cost int64) bool

But shouldn't it be better if return an error instead of bool? If it returns false, I'll never know why it false. For what reason did it return false? etc.

Use Discuss Issues for reporting issues about this repository.

Sorry for pinging. :( Why not a creating dgraph-io-bot to move issues automatically there? :)
@karlmcguire @manishrjain