A getter method cannot have a side effect. This is a really really bad code smell. I understand it was this way before - but isn't there another way around it in the getGigaSpaces() method? Such  as admin.getSpaces().get(spaceName).getGigaSpaces(). The admin API performs caching internally.