@@ -0,0 +1,406 @@
+package google.finder;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Aimport google.model.Result;%0A%0Aclass ConcurrentCache %7B%0A%0A%09// Possibly shared between threads.%0A%09private final List%3CResult%3E cache = Collections.synchronizedList(new ArrayList%3C%3E());%0A%0A%09void add(Result result) %7B%0A%09%09cache.add(result);%0A%09%7D%0A%0A%09List%3CResult%3E getWholeCache() %7B%0A%09%09return new ArrayList%3C%3E(cache);%0A%09%7D%0A%0A%7D%0A

Add a thread safe cache class.