Github user mmiklavc commented on a diff in the pull request:
    --- Diff: 
    @@ -262,11 +262,19 @@ public ProfileBuilder getBuilder(MessageRoute route, 
Context context) throws Exe
        * Builds the key that is used to lookup the {@link ProfileBuilder} 
within the cache.
    +   * <p>The cache key is built using the hash codes of the profile and 
entity name.  If the profile
    +   * definition is ever changed, the same cache entry will not be reused.  
This ensures that no
    +   * state can be carried over from the old definition into the new, which 
might result in an
    +   * invalid profile measurement.
    +   *
        * @param profile The profile definition.
        * @param entity The entity.
    -  private String cacheKey(ProfileConfig profile, String entity) {
    -    return format("%s:%s", profile, entity);
    +  private int cacheKey(ProfileConfig profile, String entity) {
    +    return new HashCodeBuilder(17, 37)
    --- End diff --
    Thanks for the explanation @nickwallen, makes sense.


Reply via email to