Bird
Raised Fist0

Which of the following is a common trade-off when using the Proxy pattern to add caching to a remote service?

medium🪤 Complexity Trap Q5 of Q15
OOP & Design Patterns - Adapter vs Facade vs Proxy - Structural Pattern Comparison
Which of the following is a common trade-off when using the Proxy pattern to add caching to a remote service?
AIncreased memory usage due to cached data, but reduced network calls
BSimplified interface for clients, but increased coupling between components
CConversion of incompatible interfaces, but added complexity in client code
DUnified access to multiple services, but loss of subsystem flexibility
Step-by-Step Solution
Solution:
  1. Step 1: Understand Proxy with caching trade-offs

    Proxy caches data to reduce network calls, increasing memory usage.
  2. Step 2: Why other options are incorrect

    Simplified interface for clients, but increased coupling between components describes Facade trade-offs; Conversion of incompatible interfaces, but added complexity in client code describes Adapter concerns; Unified access to multiple services, but loss of subsystem flexibility describes Facade drawbacks.
  3. Final Answer:

    Option A -> Option A
  4. Quick Check:

    Proxy caching trades memory for fewer calls [OK]
Quick Trick: Proxy caching trades memory for performance [OK]
Common Mistakes:
MISTAKES
  • Confusing Proxy caching with Facade simplification
  • Thinking Proxy changes interfaces
Trap Explanation:
PITFALL
  • Candidates confuse Proxy's caching trade-offs with Facade's interface simplification trade-offs.
Interviewer Note:
CONTEXT
  • Tests understanding of Proxy's resource trade-offs when adding caching.
Master "Adapter vs Facade vs Proxy - Structural Pattern Comparison" in OOP & Design Patterns

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More OOP & Design Patterns Quizzes