func (c *cache) TakeAll(cb func(f file) bool) {
	for len(c.order) > 0 {
		last := len(c.order) - 1
		tok := c.order[last]
		c.order = c.order[:last]
		entry := c.handles[tok]
		delete(c.handles, tok)
		if !cb(entry.f) {
			return
		}
	}
}
TakeAll iterates over all of the files in the cache.
package files
import (
	"github.com/vivint/rothko/internal/pcg"
)
type cacheToken int64
type cacheEntry struct {
	loc int
	tok cacheToken
	f   file
}
type cache struct {
	tok     cacheToken
	cap     int
	order   []cacheToken
	handles map[cacheToken]cacheEntry
	pcg     pcg.PCG
}
func newCache(cap int) *cache {
	return &cache{
		cap:     cap,
		order:   make([]cacheToken, 0, cap),
		handles: make(map[cacheToken]cacheEntry, cap),
		pcg:     pcg.New(0, 0),  
	}
}