Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheMap map[string]*Item
CacheMap store UUID, size, type, atime and ctime in separate (sorted) table for access by fileReaper
View Source
var CacheMapLock = sync.RWMutex{}
CacheMapLock lock write access to the CacheMap
Functions ¶
func Initialize ¶
func Initialize() (err error)
Initialize find all *.data files for nodes and populate cache only call if global --is-cache=true
Types ¶
type Item ¶
type Item struct { UUID string `bson:"uuid" json:"uuid" ` // e.g. node UUID Access time.Time `bson:"last_accessed" json:"last_accessed" ` // e.g. access time Type string `bson:"type" json:"type"` Size int64 `bson:"size" json:"size" ` // e.g. size in bytes CreatedOn time.Time `bson:"url" json:"url" yaml:"URL"` // e.g. creation of local copy }
Item information to manage file expiration on cache servers
Click to show internal directories.
Click to hide internal directories.