mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
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:
parent
f23069dd2c
commit
3624e73d36
6 changed files with 62 additions and 19 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue