import java.util.HashMap; import java.util.Map; public class SessionCache { public SessionCache() { } /* * Create object to store sessions */ Map cache = new HashMap(); public static class ActiveSessionsObj { public ActiveSessionsObj() { } } public void addCache(String key, String user, String password) { /* For storing sessions */ Map cacheData = new HashMap(); cacheData.put("username", user); cacheData.put("password", password); cache.put(key, cacheData); } }