func (m *MemoryCache) cleanupGoroutine() {
	for {
		time.Sleep(time.Hour)
		m.mu.Lock()
		start := time.Now().Unix()
		for k, v := range m.m {
			// Delete entries older than a day
			if start-v.lastModification > 3600*24 {
				delete(m.m, k)
			}
		}
		m.mu.Unlock()
	}
}
// cleanupGoroutine deletes old files from memory
cleanupGoroutine deletes old files from memory
// cleanupGoroutine deletes old files from memory
func (m *MemoryCache) cleanupGoroutine() {
	for {
		time.Sleep(time.Hour)
		m.mu.Lock()
		start := time.Now().Unix()
		for k, v := range m.m {
			if start-v.lastModification > 3600*24 {
				delete(m.m, k)
			}
		}
		m.mu.Unlock()
	}
}
func ( m * MemoryCache ) cleanupGoroutine ( ) { for { time . Sleep ( time . Hour ) m . mu . Lock ( ) start := time . Now ( ) . Unix ( ) for k , v := range m . m { if start - v . lastModification > 3600 * 24 { delete ( m . m , k ) } } m . mu . Unlock ( ) } }
cleanupGoroutine deletes old files from memory
cleanupGoroutine deletes old files from memory
// Delete entries older than a day