19 lines
440 B
Go
19 lines
440 B
Go
package models
|
|
|
|
// this file is only used as cache for the diffenrent absence and booking types,
|
|
// in the future this should be two chaching variables each in their own place
|
|
|
|
import (
|
|
"arbeitszeitmessung/helper"
|
|
)
|
|
|
|
var definedTypes = helper.NewCache(3600, func(key string) (any, error) {
|
|
switch key {
|
|
case "s_abwesenheit_typen":
|
|
return GetAbsenceTypes()
|
|
case "s_anwesenheit_typen":
|
|
return GetBookingTypes()
|
|
}
|
|
return nil, nil
|
|
})
|