---
title: "github.com/dgraph-io/ristretto v1.0.0 Breaking Changes"
description: "What each github.com/dgraph-io/ristretto release removed, renamed or changed: 18 breaking changes in 2 versions on Go modules, each with its source."
canonical_url: https://since.dev/packages/go/github.com/dgraph-io/ristretto
last_updated: 2026-12-04
---

# github.com/dgraph-io/ristretto breaking changes

github.com/dgraph-io/ristretto v1.0.0 (September 17, 2024) is its newest release with breaking changes, 16 of them. The first: Signature changed github.com/dgraph-io/ristretto.Cache. Every breaking API change we have recorded in github.com/dgraph-io/ristretto on Go modules: 18 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `v1.0.1`, released October 22, 2024. 

Packages on Go modules run on Go. [Go end of life dates](https://since.dev/calendar/go.md).

- From [v0.2.0](#v-v0-2-0) to [v1.0.0](#v-v1-0-0): 16 breaking changes in 1 version.

## github.com/dgraph-io/ristretto v1.0.0 breaking changes

github.com/dgraph-io/ristretto v1.0.0, released September 17, 2024: 16 breaking changes.

- **Signature changed** `github.com/dgraph-io/ristretto.Cache`  

Was type Cache struct; now type Cache\[K Key, V any\] struct. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Cache.Del`  

Was func Del(interface{}); now func Del(K). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Cache.Get`  

Was func Get(interface{}) (interface{}, bool); now func Get(K) (V, bool). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Cache.GetTTL`  

Was func GetTTL(interface{}) (time.Duration, bool); now func GetTTL(K) (time.Duration, bool). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Cache.Set`  

Was func Set(interface{}, interface{}, int64) bool; now func Set(K, V, int64) bool. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Cache.SetWithTTL`  

Was func SetWithTTL(interface{}, interface{}, int64, time.Duration) bool; now func SetWithTTL(K, V, int64, time.Duration) bool. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Config`  

Was type Config struct; now type Config\[K Key, V any\] struct. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Config.Cost`  

Was Cost func(interface{}) int64; now Cost func(V) int64. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Config.KeyToHash`  

Was KeyToHash func(interface{}) (uint64, uint64); now KeyToHash func(K) (uint64, uint64). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Config.OnEvict`  

Was OnEvict func(\*Item); now OnEvict func(\*Item\[V\]). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Config.OnExit`  

Was OnExit func(interface{}); now OnExit func(V). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Config.OnReject`  

Was OnReject func(\*Item); now OnReject func(\*Item\[V\]). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Item`  

Was type Item struct; now type Item\[V any\] struct. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.Item.Value`  

Was Value interface{}; now Value V. [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto.NewCache`  

Was func NewCache(\*Config) (\*Cache, error); now func NewCache\[K Key, V any\](\*Config\[K, V\]) (\*Cache\[K, V\], error). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)
- **Signature changed** `github.com/dgraph-io/ristretto/z.KeyToHash`  

Was func KeyToHash(interface{}) (uint64, uint64); now func KeyToHash\[K Key\](K) (uint64, uint64). [pkg.go.dev](https://pkg.go.dev/github.com/dgraph-io/ristretto@v1.0.0)

## github.com/dgraph-io/ristretto v0.2.0 breaking changes

github.com/dgraph-io/ristretto v0.2.0, released September 17, 2024: 2 breaking changes.

- **Configuration changed**  

A new configuration option controls the cleanup ticker duration; existing configurations are not affected by this addition. [github.com](https://github.com/dgraph-io/ristretto/releases/tag/v0.2.0)
- **Signature changed**  

Slice-related methods changed their integer type from uint32 to uint64, so callers passing or receiving uint32 values must update. [github.com](https://github.com/dgraph-io/ristretto/releases/tag/v0.2.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
