func flushColections() {
	r := context.CollectionFactory().RemoteRepoCollection()
	r.Lock()
	defer r.Unlock()
	l := context.CollectionFactory().LocalRepoCollection()
	l.Lock()
	defer l.Unlock()
	s := context.CollectionFactory().SnapshotCollection()
	s.Lock()
	defer s.Unlock()
	p := context.CollectionFactory().PublishedRepoCollection()
	p.Lock()
	defer p.Unlock()
	context.CollectionFactory().Flush()
}
Flushes all collections which cache in-memory objects
package api
import (
	"fmt"
	"sort"
	"time"
	"github.com/aptly-dev/aptly/aptly"
	"github.com/aptly-dev/aptly/deb"
	"github.com/aptly-dev/aptly/query"
	"github.com/gin-gonic/gin"
)
func apiVersion(c *gin.Context) {
	c.JSON(200, gin.H{"Version": aptly.Version})
}
type dbRequestKind int
const (
	acquiredb dbRequestKind = iota
	releasedb
)
type dbRequest struct {
	kind dbRequestKind
	err  chan<- error
}