Redis Cache storing whole objects vs cache models with partial information

548 views Asked by At

I am using Azure Redis Cache to store objects. Before I save them to the cache im compressing them using MessagePack. My question is, is there a performance loss on retrieving a full object vs retrieving a cache model that has only the properties that are currently used.

The reason I want to store the whole object is to future proof and not have to update the cache models if suddenly a new property is needed. Also using the original class I can use one Core model to interact with the DB and the cache.

My thought is since im already opening the connection to the cache ive already paid the heavy cost and the transfer itself is negligible with the compressed data. We are talking in the realms of 3-4 KB at the extreme max.

0

There are 0 answers