Courseiva
Question 40 of 1,446

PCDE Practice Question: Manage a solution that can span multiple database technologies

You have a Memorystore for Redis instance that serves as a session store for a web application. The instance is running low on memory and is approaching the maxmemory limit. You want to ensure that the least recently used keys are evicted first when memory is full. Which eviction policy should you configure?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

volatile-lru

The volatile-lru policy evicts keys with an expire set (TTL) using the LRU algorithm. For a session store, sessions typically have a TTL, so volatile-lru is appropriate. allkeys-lru would evict any key regardless of TTL, which might remove important keys. noeviction would cause write errors when memory is full. volatile-ttl evicts based on TTL, not LRU.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • allkeys-lru

    Why it's wrong here

    allkeys-lru evicts any key, including those without TTL, which could cause unintended data loss.

  • noeviction

    Why it's wrong here

    noeviction returns errors on writes when memory is full, which would break the session store.

  • volatile-lru

    Why this is correct

    Volatile-lru evicts least recently used keys among those with an expire set. Sessions usually have TTL, so this is the correct policy.

  • volatile-ttl

    Why it's wrong here

    volatile-ttl evicts keys with the shortest TTL, not based on recency of use. This might not be ideal for session LRU behavior.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.