1 package org.opensrf.util;
2 import com.danga.MemCached.*;
8 public class Cache extends MemCachedClient {
12 setCompressThreshold(4096); /* ?? */
16 * Initializes the cache client
17 * @param serverList Array of server:port strings specifying the
18 * set of memcache servers this client will talk to
20 public static void initCache(String[] serverList) {
21 SockIOPool pool = SockIOPool.getInstance();
22 pool.setServers(serverList);
24 com.danga.MemCached.Logger logger =
25 com.danga.MemCached.Logger.getLogger(MemCachedClient.class.getName());
26 logger.setLevel(logger.LEVEL_ERROR);
30 * Initializes the cache client
31 * @param serverList List of server:port strings specifying the
32 * set of memcache servers this client will talk to
34 public static void initCache(List<String> serverList) {
35 initCache(serverList.toArray(new String[]{}));