本文共 873 字,大约阅读时间需要 2 分钟。
MemcachedClient mcc = new MemcachedClient(list);if(mcc.get("something")==null){ if(!DataFactory.Exist(somethingObject)) { DataFactory.StoreInDB(somethingObject); } mcc.set("something", 900, somethingObject).get();}ReadObject readObject =mcc.get("something");readObject.DoClientLogic();
MemcachedClient mcc = new MemcachedClient(list);if(mcc.get("something")==null){ if(!DataFactory.Exist(somethingObject)) { DataFactory.StoreInDB(somethingObject); } mcc.set("something", 900, somethingObject).get();}
MemcachedClient mcc = new MemcachedClient(list);ReadObject readObject =new ReadObject();if(mcc.get("something")==null){ readObject =DataFactory.ReadFromDB(somethingObject);}else{ readObject =mcc.get("something");}readObject.DoClientLogic();
碰到任何问题,请回复,共同讨论,谢谢!
转载地址:http://nhlha.baihongyu.com/