Hi,<br> I was trying my hand on memcache - java version, experimenting a little bit. What i cannot understand is how do I keep different types of caches on memcache. I tried creating two separate SocketIOPool connections with same server address but different ports. See below :-<br> public MemCacheImpl() {<br> String[] serverlist = {"172.16.2.82:11211"};<br> String[] serverlist2 = {"172.16.2.82:11212"};<br> <br> // initialize the pool for memcache servers<br> SockIOPool pool = SockIOPool.getInstance();<br> SockIOPool pool2 = SockIOPool.getInstance();<br> pool.setServers(serverlist);<br> pool2.setServers(serverlist2);<br> <br> <br>
pool.setInitConn(5);<br> pool.setMinConn(5);<br> pool.setMaxConn(50);<br> pool.setMaintSleep(30);<br> <br> pool.setNagle(false);<br> pool.initialize();<br> //for pool2<br> pool2.setInitConn(5);<br> pool2.setMinConn(5);<br> pool2.setMaxConn(50);<br> pool2.setMaintSleep(30);<br> <br> pool2.setNagle(false);<br> pool2.initialize();<br> <br> }<br> It gave an exception as ++++++ trying to
initialize an already initialized pool.<br> <br> By different types of caches I mean I need to store PersonCache, ProjectCache in memcache. Currently I have these caches as implementation of Maps. But I want that a key of particular map(cache) goes into one memcache server. How can I do that? <br> ie.<br> PersonCache = Map <br> Key = personID<br> value = PersonValueObject<br> <br> ProjectCache = Map<br> Key = projectID<br> Value = ProjectValueObject<br> <br> Now, If I have two memcache servers running on different ports as mentioned above, how do I designate an Element(key-value) of PersonCache to go to only server1 and Element of ProjectCache to go to server2 ??<br> <br> Can u pls tell me how can I create different caches on memcache? Also how can I create different configuration of SocketIOPool (s), so that they act as 'different caches' ??<br> <br> Regards,<br> Abbey.<br> <BR><BR><p> 
                <hr size=1>Yahoo! Messenger with Voice. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman1/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">Make PC-to-Phone Calls</a> to the US (and 30+ countries) for 2¢/min or less.