Skip to content

Commit

Permalink
Fix cache metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
salesfelipe committed Jan 27, 2025
1 parent 80b879d commit 46e9a5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const SIX_SECONDS_MS = 6 * 1000
const NINE_SECONDS_MS = 9 * 1000

// Segments are small and immutable.
const MAX_SEGMENT_CACHE = 10000
const segmentCache = new LRUCache<string, Cached>({ max: MAX_SEGMENT_CACHE })
const segmentCache = new LRUCache<string, Cached>({ max: 1000 })
const searchCache = new LRUCache<string, Cached>({ max: 3000 })
const messagesCache = new LRUCache<string, Cached>({ max: 3000 })
const vbaseCache = new LRUCache<string, Cached>({ max: 3000 })
Expand All @@ -27,6 +26,7 @@ metrics.trackCache('segment', segmentCache)
metrics.trackCache('search', searchCache)
metrics.trackCache('messages', messagesCache)
metrics.trackCache('vbase', vbaseCache)
metrics.trackCache('apps', appsCache)

export default new Service<Clients, RecorderState, CustomContext>({
clients: {
Expand Down

0 comments on commit 46e9a5d

Please sign in to comment.