initial mongo indexed linksto

This commit is contained in:
Barak Michener 2015-04-18 19:55:39 -04:00
parent 6764ea0295
commit 5be1df3be3
9 changed files with 362 additions and 18 deletions

View file

@ -16,6 +16,7 @@ package mongo
import (
"container/list"
"fmt"
)
// TODO(kortschak) Reimplement without container/list.
@ -48,6 +49,9 @@ func (lru *cache) Put(key string, value string) {
lru.removeOldest()
}
lru.priority.PushFront(kv{key: key, value: value})
if lru.priority == nil {
fmt.Println("wat")
}
lru.cache[key] = lru.priority.Front()
}