fixed formatting
This commit is contained in:
4
item.go
4
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
|
||||
|
@@ -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]
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user