79288037

Date: 2024-12-17 13:32:10
Score: 1
Natty:
Report link

For high-speed scenarios where you only need to check if the id exists and don’t need the full object, storing just the id in a separate cache is usually better. It makes checking faster.

If memory is not a big concern and you want to keep things simple, you can stick with storing everything in the same cache, but it will be slower.

So, in most cases with a high-throughput flow, create a separate cache for just the id. This will make the system faster because you only need to read the small id data instead of the whole object.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ugo Marin