a287830d1f
Adds the new "--http-video-maxage SECONDS" config option. Signed-off-by: Michael Mayer <michael@photoprism.app>
16 lines
340 B
Go
16 lines
340 B
Go
package ttl
|
|
|
|
import "strconv"
|
|
|
|
// Duration represents a cache duration in seconds.
|
|
type Duration int
|
|
|
|
// Int returns the cache Duration in seconds as signed integer.
|
|
func (a Duration) Int() int {
|
|
return int(a)
|
|
}
|
|
|
|
// String returns the cache Duration in seconds as string.
|
|
func (a Duration) String() string {
|
|
return strconv.Itoa(int(a))
|
|
}
|