]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/java/org/opensrf/test/TestCache.java
LP1827055 Remove Python libs, install bits, and docs
[OpenSRF.git] / src / java / org / opensrf / test / TestCache.java
1 package org.opensrf.test;
2 import org.opensrf.*;
3 import org.opensrf.util.*;
4 import java.util.List;
5 import java.util.ArrayList;
6
7 public class TestCache {
8     public static void main(String args[]) throws Exception {
9
10         /**
11          * args is a list of string like so:  server:port server2:port server3:port ...
12          */
13
14         Cache.initCache(args);
15         Cache cache = new Cache();
16
17         cache.set("key1", "HI, MA!");
18         cache.set("key2", "HI, MA! 2");
19         cache.set("key3", "HI, MA! 3");
20
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"));
24     }
25 }
26
27