func TLRUCache(maxentries int, on bool) *tlruCache {
	return &tlruCache{
		MaxEntries: maxentries,
		list:       list.New(),
		cache:      make(map[string]*list.Element),
		on:         on,
	}
}
Returns a TLRU cache interface
package djinn
import (
	"container/list"
	"html/template"
	"sync"
	"time"
)
type Cache interface {
	Add(string, *template.Template)
	Get(string) (*template.Template, bool)
	Remove(string)
	Clear()
	On() bool
	SetCaching(bool)
}
type tlruCache struct {
	sync.RWMutex
	MaxEntries int
	list       *list.List
	cache      map[string]*list.Element
	on         bool
}