code: @Override
      public void afterPropertiesSet() throws Exception {
          if (this.cacheKeyGenerator == null) {
              final AttributeBasedCacheKeyGenerator cacheKeyGenerator = new AttributeBasedCacheKeyGenerator();
              cacheKeyGenerator.setCacheKeyAttributes(this.cacheKeyAttributes);
  
              final IUsernameAttributeProvider usernameAttributeProvider = this.getUsernameAttributeProvider();
              final String usernameAttribute = usernameAttributeProvider.getUsernameAttribute();
              cacheKeyGenerator.setDefaultAttributeName(usernameAttribute);
              this.cacheKeyGenerator = cacheKeyGenerator;
          }
      }
docs: /* (non-Javadoc)
  @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()