1 package org.opensrf.test;
3 import org.opensrf.util.*;
5 import java.util.ArrayList;
7 public class TestCache {
8 public static void main(String args[]) throws Exception {
11 * args is a list of string like so: server:port server2:port server3:port ...
14 Cache.initCache(args);
15 Cache cache = new Cache();
17 cache.set("key1", "HI, MA!");
18 cache.set("key2", "HI, MA! 2");
19 cache.set("key3", "HI, MA! 3");
21 System.out.println("got key1 = " + (String) cache.get("key1"));
22 System.out.println("got key2 = " + (String) cache.get("key2"));
23 System.out.println("got key3 = " + (String) cache.get("key3"));