redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.
Apache License 2.0
2.46k stars 158 forks source link

Hashmap invalidation of specific fields in client side cache #673

Closed CariappaKGanapathi closed 5 days ago

CariappaKGanapathi commented 6 days ago

Currently, when a hset/hdel operation takes place, the entire key along with all the fields is purged from the lru, it would be beneficial if the specific field was only purged on such operations. Not sure why this limitation is in place. Please help me understand if this is even possible to be notified through redis in the first place.

rueian commented 6 days ago

Hi @CariappaKGanapathi,

Redis only tracks changes at key levels as well as notifications it sends, therefore we have no choice but to purge the entire key.