Courseiva

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

A Cloud Memorystore for Redis instance is running out of memory. The team wants to automatically remove the least recently used keys when memory is full. Which eviction policy should they configure?

⚠ Common exam trap

A common pitfall is confusing volatile-lru (only keys with TTL) with allkeys-lru (all keys), leading candidates to choose volatile-lru when the requirement is to consider all keys.

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

allkeys-lru

The `allkeys-lru` eviction policy is correct because it applies the LRU (Least Recently Used) algorithm to all keys in the Redis instance, not just those with an expiry set. This ensures that when memory is full, the least recently accessed keys are automatically removed, regardless of whether they have a TTL, which directly meets the requirement to free memory without manual intervention.

Answer analysis

Option-by-option breakdown

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

  • volatile-lru

    Why it's wrong here

    Evicts only keys with TTL set.

  • volatile-ttl

    Why it's wrong here

    Evicts keys with shortest TTL.

  • noeviction

    Why it's wrong here

    Does not evict; returns errors.

  • allkeys-lru

    Why this is correct

    Evicts least recently used keys from all keys.

About these practice questions

Courseiva writes every PCDE question from scratch — 1,446 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.