initial mongo indexed linksto
This commit is contained in:
parent
6764ea0295
commit
5be1df3be3
9 changed files with 362 additions and 18 deletions
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue