Config: Add a simple cache to reduce disk I/O under stress

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2025-10-20 01:41:19 +02:00
parent f23069dd2c
commit 3624e73d36
6 changed files with 62 additions and 19 deletions

View file

@ -132,6 +132,11 @@ func isJoinTokenSeparatorIndex(i int) bool {
// IsJoinToken checks if the string represents a join token.
func IsJoinToken(s string, strict bool) bool {
// Basic mode: No token, not valid.
if s == "" {
return false
}
// Non-strict mode: only enforce minimum length so legacy tokens that were
// longer than the auto-generated format continue to work.
if !strict {