I just heard that DLR has a three level caching strategy.. But what it is .. A simple explanation with simple example will be very helpful.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how I understand it, the idea of the caching is to reuse expressions wherever possible to reduce the dynamic vs static overhead of dynamic expression evaluation.
imagine a dynamic expression
Then working this out the first time an expression/syntax tree will need to be created (if one doesn’t exist). This is of the type
This is essentially a rule that can evaulated and if true the expression can be used. Hence we have a level 1 cache.
Level 2 is simillar but a more complex rule, probably along the lines of:
Level 3 is more complex still.
if no expression can be found then a new expression is created and added to one of the caches (though I don’t know anything about that).
As I understand it l1 is 1 rule, l2 is about 10 rules and l3 is about 100 rules.
I got all this from reading around the subject on google.
– http://dotnetslackers.com/articles/csharp/Dissecting-C-Sharp-4-0-Dynamic-Programming.aspx
– http://msdn.microsoft.com/en-us/magazine/cc163344.aspx
and some others I cannot recall now.