diff --git a/item.go b/item.go index a46fc26..cb5ae94 100644 --- a/item.go +++ b/item.go @@ -18,8 +18,8 @@ func (n *nilItem) Release() {} var NilTracked = new(nilItem) type Item struct { - key string - group string + key string + group string promotions int32 refCount int32 expires int64 diff --git a/layeredbucket.go b/layeredbucket.go index 754f50a..a0f47f6 100644 --- a/layeredbucket.go +++ b/layeredbucket.go @@ -20,7 +20,6 @@ func (b *LayeredBucket) get(primary, secondary string) *Item { return bucket.get(secondary) } - func (b *LayeredBucket) set(primary, secondary string, value interface{}, duration time.Duration) (*Item, bool) { b.Lock() bucket, exists := b.buckets[primary] diff --git a/layeredcache_test.go b/layeredcache_test.go index 6ae33bf..c9e5642 100644 --- a/layeredcache_test.go +++ b/layeredcache_test.go @@ -2,9 +2,9 @@ package ccache import ( . "github.com/karlseguin/expect" + "strconv" "testing" "time" - "strconv" ) type LayeredCacheTests struct{} @@ -51,7 +51,6 @@ func (l *LayeredCacheTests) DeletesAValue() { Expect(cache.Get("leto", "sister").(string)).To.Equal("ghanima") } - func (l *LayeredCacheTests) DeletesALayer() { cache := newLayered() cache.Set("spice", "flow", "value-a", time.Minute) @@ -64,10 +63,6 @@ func (l *LayeredCacheTests) DeletesALayer() { Expect(cache.Get("leto", "sister").(string)).To.Equal("ghanima") } - - - - func (c *LayeredCacheTests) GCsTheOldestItems() { cache := Layered(Configure().ItemsToPrune(10)) cache.Set("xx", "a", 23, time.Minute)