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