public static Vote getVote(int uid, int sid) { ObjectCache cache = ObjectCache.getInstance(); Vote v = (Vote) cache.lookupObject(uid, sid, "votes"); if (v == null) { v = new Vote(uid, sid); } return v; }