Is there any point caching the value when the expected value is part of the cache key? (i.e. All the FormatSpecification instances have unique FileElement instances, pretty much by definition.) It might be worth caching if you remove the expected value (which is what the old code used to do), or removing it altogether if tests show there's negligible performance impact.