ConcurrentDictionary, Store Key and Compression
GetHashCode is used internally by ConcurrentDictionary to speed up access to the real key.

But, there is no guarantee that 2 different strings will return 2 different HashCode, you may encounter collisions! Such collisions are handled by the ConcurrentDictionary. 

So with your code, as the _compilerCache is a Dictionary&lt;int,functor&gt; (it seems to be) and not a Dictionary&lt;string,functor&gt;, you may encounter rare events where two different codes will give the same key. If such a collision happends, you have a subtle and rare bug.

I suggest the following :    


stick to a Dictionary&lt;string,functor&gt;, use the real key
don't input a HashCode instead of the real key 
you may also input your own GetHashCode in Dictionary constructor


Using code instead of int as a key has a price : memory footprint is larger, but with small strings (10-20 char), it should not be an issue.

Hope this helps !