158159160161162163164165166167
Map<String, String> parameters = new HashMap<String, String>(); parameters.put(SessionParameter.CACHE_SIZE_OBJECTS, "" + cacheSize); parameters.put(SessionParameter.CACHE_TTL_OBJECTS, "" + ttl); cache.initialize(null, parameters); return cache; } }