renamed MaxItems to MaxSize, updated readme

This commit is contained in:
Karl Seguin
2014-11-21 15:06:27 +07:00
parent c810d4feb3
commit 41ccfbb39a
6 changed files with 19 additions and 15 deletions

View File

@@ -145,7 +145,7 @@ func (c *Cache) worker() {
for {
select {
case item := <-c.promotables:
if c.doPromote(item) && atomic.LoadInt64(&c.size) > c.maxItems {
if c.doPromote(item) && atomic.LoadInt64(&c.size) > c.maxSize {
c.gc()
}
case item := <-c.deletables: