Memoization in mcmc

Hi there,

I wondered if how Turing or RxInfer deals w/ the following situation.

For example, I have 10 parameters x1,…x10, the likelihood function is as follows.

x1^2 + … + x10^2

Apparently, when updating x1, the other parts of the likelihood function

x2^2+…+x10^2

need not be re-calculated. I wondered if Turing will automatically reuse previously calculated result or does it recalculate the whole likelihood updating each of the parameters. Thanks in advance!