2022-10-15 21:54:11 +02:00
|
|
|
package get
|
2020-05-07 19:42:04 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/photoprism"
|
|
|
|
)
|
|
|
|
|
|
|
|
var oncePurge sync.Once
|
|
|
|
|
|
|
|
func initPurge() {
|
2020-11-15 15:15:56 +01:00
|
|
|
services.Purge = photoprism.NewPurge(Config(), Files())
|
2020-05-07 19:42:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func Purge() *photoprism.Purge {
|
|
|
|
oncePurge.Do(initPurge)
|
|
|
|
|
|
|
|
return services.Purge
|
|
|
|
}
|