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

add Set,List,Hash #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

znddzxx112
Copy link

Hash

  • (table *CacheTable) HAdd(key interface{}, lifeSpan time.Duration, hkey interface{}, hvalue interface{}) *CacheItem
  • (table *CacheTable) HValue(key interface{}, hkey interface{}) (interface{}, error)
  • (table *CacheTable) HDelete(key interface{}, hkey interface{}) error

List

  • (table *CacheTable) LPush(key interface{}, lifeSpan time.Duration, value interface{}) error
  • (table *CacheTable) LPop(key interface{}) (interface{}, error)
  • (table *CacheTable) RPush(key interface{}, lifeSpan time.Duration, value interface{}) error
  • (table *CacheTable) RPop(key interface{}) (interface{}, error)
  • (table *CacheTable) ListLength(key interface{}) (int, error)

Set

  • (table *CacheTable) SAdd(key interface{}, lifeSpan time.Duration, member interface{}) *CacheItem
  • (table *CacheTable) SIsMember(key interface{}, member interface{}) bool
  • (table *CacheTable) SDelete(key interface{}, member interface{}) error

@coveralls
Copy link

Coverage Status

Coverage decreased (-6.1%) to 93.869% when pulling ac19fc8 on znddzxx112:cacheitemSet into 493cbf5 on muesli:master.

@muesli
Copy link
Owner

muesli commented Apr 25, 2019

I like your work, but is this necessary as part of cache2go, though? I wonder if that's not out-of-scope for a small caching library like this. Couldn't you just use your set/list/hash and add them as a member to a cache table?

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

Successfully merging this pull request may close these issues.

3 participants