code: public UserProfile findUserProfileByName(String userName) throws Exception
     {
        UserProfile profile = getFromCache(userName);
        if (profile != null)
        {
           return profile;
        }
  
        Session session = service.getStorageSession();
        try
        {
           profile = readProfile(session, userName);
           if (profile != null)
           {
              putInCache(profile);
           }
        }
        finally
        {
           session.logout();
        }
  
        return profile;
     }
docs: {@inheritDoc}