Skip to content

Add Jedis (for Valkey) caches for domains and hosts#3013

Open
gbrodman wants to merge 1 commit intogoogle:masterfrom
gbrodman:jedis
Open

Add Jedis (for Valkey) caches for domains and hosts#3013
gbrodman wants to merge 1 commit intogoogle:masterfrom
gbrodman:jedis

Conversation

@gbrodman
Copy link
Copy Markdown
Collaborator

@gbrodman gbrodman commented Apr 16, 2026

We add optional Valkey caching of hosts and domains for future use. Eventually, this will allow us to pre-warm large amounts of data in Valkey for quick retrieval during actions like RDAP.

Note: this doesn't actually use the caches yet.

We use Jedis instead of Redisson for speed purposes
(https://www.instaclustr.com/blog/redis-java-clients-and-client-side-caching/)
which means that we have to implement our own multilayer cache but
that's not the worst thing in the world.

Tested on crash with logging and RDAP code that's not included in this
PR -- it behaves as you'd expect, where the local cache works for
immediate re-lookups and the remote cache works after a restart.


This change is Reviewable

@gbrodman gbrodman force-pushed the jedis branch 5 times, most recently from ffce812 to 2198f73 Compare April 17, 2026 14:49
Comment thread core/src/main/java/google/registry/cache/CacheModule.java Fixed
@gbrodman gbrodman force-pushed the jedis branch 2 times, most recently from cfced4c to 37c8675 Compare April 17, 2026 22:11
Comment thread core/src/main/java/google/registry/model/common/TimeOfYear.java Fixed
Comment thread core/src/main/java/google/registry/model/common/TimeOfYear.java Fixed
Comment thread core/src/main/java/google/registry/cache/CacheModule.java Fixed
@gbrodman gbrodman force-pushed the jedis branch 6 times, most recently from c0d8942 to d7b0638 Compare April 21, 2026 20:38
We add optional Valkey caching of hosts and domains for future use. Eventually, this will allow us to pre-warm large amounts of data in Valkey for quick retrieval during actions like RDAP.

Note: this doesn't actually use the caches yet.

We use Jedis instead of Redisson for speed purposes
(https://www.instaclustr.com/blog/redis-java-clients-and-client-side-caching/)
which means that we have to implement our own multilayer cache but
that's not the worst thing in the world.

Tested on crash with logging and RDAP code that's not included in this
PR -- it behaves as you'd expect, where the local cache works for
immediate re-lookups and the remote cache works after a restart.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants