code: func (s *fsCacheStore) Prune(ctx context.Context) (uint64, error) {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  	var size uint64
  
  	for id, snap := range s.sources {
  		select {
  		case <-ctx.Done():
  			logrus.Debugf("Cache prune operation cancelled, pruned size: %d", size)
  			// when the context is cancelled, only return current size and nil
  			return size, nil
  		default:
  		}
  		if len(snap.refs) == 0 {
  			ss, err := snap.getSize(ctx)
  			if err != nil {
  				return size, err
  			}
  			if err := s.delete(id); err != nil {
  				return size, errors.Wrapf(err, "failed to delete %s", id)
  			}
  			size += uint64(ss)
  		}
  	}
  	return size, nil
  }
docs: // Prune allows manually cleaning up the cache