Skip to content

Commit

Permalink
update cache ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
spikelu2016 committed Aug 10, 2024
1 parent 9a28470 commit c342d01
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.35.1 - 2024-08-10
### Changed
- Changed cache TTL from `1h` to `24h` for keys and provider settings

## 1.35.0 - 2024-08-10
### Added
- Added cost tracking for `gpt-4o-2024-08-06`
Expand Down
2 changes: 1 addition & 1 deletion internal/manager/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (m *Manager) GetKeyViaCache(raw string) (*key.ResponseKey, error) {
return stored, nil
}

err = m.kc.Set(raw, bs, time.Hour)
err = m.kc.Set(raw, bs, 24*time.Hour)
if err != nil {
telemetry.Incr("bricksllm.manager.get_key_via_cache.set_error", nil, 1)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/manager/provider_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (m *ProviderSettingsManager) GetSettingViaCache(id string) (*provider.Setti
return stored, nil
}

err = m.Cache.Set(id, bs, time.Hour)
err = m.Cache.Set(id, bs, 24*time.Hour)
if err != nil {
telemetry.Incr("bricksllm.provider_settings_manager.get_setting_via_cache.set_error", nil, 1)
}
Expand Down

0 comments on commit c342d01

Please sign in to comment.