static L loadSnippets(S... ids) { ret loadSnippets(asList(ids)); } static L loadSnippets(L ids) ctex { new L texts; new L buf; new Map cached; initSnippetCache(); for (S id : ids) { long snippetID = psI(id); S text = DiskSnippetCache_get(snippetID); S md5 = text != null ? md5(text) : "."; mapPut(cached, snippetID, text); buf.append(snippetID).append(" ").append(md5).append(" "); } Map map = jsonDecodeMap(doPost( "ids=" + urlencode(trim(str(buf))), tb_mainServer() + "/get-multi2.php")); for (S id : ids) { long snippetID = psI(id); O result = map.get(str(snippetID)); if (result instanceof S) texts.add((S) result); else texts.add(cached.get(snippetID)); } ret texts; }