QuestionQ16

Connect to and consume Azure services

Embeddings are stored in Redis with keys formatted as doc:(id). Some embeddings are accessed frequently, while others are rarely used.

You need to implement a caching strategy that retains only frequently accessed embeddings in memory.

What should you use?

  • A volatile-ttl
  • B allkeys-lru
  • C EXPIRE command
  • D time-window expiration
Explanation

Redis’s allkeys-lru eviction policy applies to all keys and evicts the least recently used ones when the configured memory limit is reached. This keeps frequently accessed embeddings in memory while allowing rarely used embeddings to be removed.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!