Question d’entretien chez Amazon

design api for cache management

Réponses aux questions d'entretien

Utilisateur anonyme

24 déc. 2011

looking for what kind of function u will expose with exceptions etc...

Utilisateur anonyme

3 janv. 2012

What was the answer for this? My answer would be we should apply adapter design pattern (or bridge) into this question since we could cache data using many storage engine (file, memcache, db).

Utilisateur anonyme

21 oct. 2012

From answer is Cache with Proxy pattern package xyz; public interface Data{ public String getData(); } package xyz; class RealData implements Data{ private String data; RealData(String data){ this.data = data; } public String getData(){ return data; } } package xyz; public class CacheDataProxy implements Data{ private String data = null; private RealData realData; public CacheDataProxy(){ realData = new RealData(); } public String getData(){ if(data == null){ data = realData.getData(); } return data; } }