src/server/pkg/localcache/cache.go
func (c *Cache) Clear() error {
	c.mu.Lock()
	defer c.mu.Unlock()
	defer func() {
		c.keys = make(map[string]bool)
	}()
	for key := range c.keys {
		if err := os.Remove(filepath.Join(c.root, key)); err != nil {
			return err
		}
	}
	return nil
}
func (c *Cache) Clear() error {
	c.mu.Lock()
	defer c.mu.Unlock()
	defer func() {
		c.keys = make(map[string]bool)
	}()
	for key := range c.keys {
		if err := os.Remove(filepath.Join(c.root, key)); err != nil {
			return err
		}
	}
	return nil
}
func ( c * Cache ) Clear ( ) error { c . mu . Lock ( ) defer c . mu . Unlock ( ) defer func ( ) { c . keys = make ( map [ string ] bool ) } ( ) for key := range c . keys { if err := os . Remove ( filepath . Join ( c . root , key ) ) ; err != nil { return err } } return nil }
// Clear clears the cache.
Clear clears the cache .