feat: extend voices cache expiry to 24 hours for improved performance
This commit is contained in:
@@ -173,7 +173,7 @@ func (c *Client) ListVoices(ctx context.Context, locale string) ([]models.Voice,
|
||||
// 更新缓存
|
||||
c.voicesCacheMu.Lock()
|
||||
c.voicesCache = voices
|
||||
c.voicesCacheExpiry = time.Now().Add(1 * time.Hour) // 缓存1小时
|
||||
c.voicesCacheExpiry = time.Now().Add(24 * time.Hour) // 缓存24小时
|
||||
c.voicesCacheMu.Unlock()
|
||||
|
||||
// 如果指定了locale,则过滤结果
|
||||
|
||||
Reference in New Issue
Block a user