cockroachdb / cockroachdb/cockroach

util/cache: replace all instances of interface{} with generic cache

Open
#172,141 0 comments 0 reactions 1 assignee Claimed by @jeffswenson View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

The util/cache package pre-dates go generics so the widely used cache has to cast keys and values to interface{}. This less type safe and causes allocations due to boxing.

We should replace all of the legacy cache instances with the typed generic implementation.

Jira issue: CRDB-65285

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.