Want to improve t开发者_JS百科his question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this questionAlthough it's true that some recursive-nameserver configurations are (sloppily) referred to as "caching", e.g., by RHEL/Fedora/CentOS, that's a really bad name for that function -- because caching is orthogonal to recursion.
Theoretically, you could write a nameserver that does recursive service but doesn't cache its results. (That would be a bit perverse, and I don't know of any.) Conversely, nameserver packages that cache but know nothing about how to recurse and instead do less-helpful alternative iterative service are common: dnsmasq, pdnsd, etc. ... ...
Above text source: http://linuxgazette.net/170/lan.html
Please explain what does the author means by "caching is orthogonal to recursion" ?
From Wikipedia's definition of orthogonal:
For example, a car has orthogonal components and controls (e.g. accelerating the vehicle does not influence anything else but the components involved exclusively with the acceleration function).
The author is saying that whether a nameserver caches is nothing to do with whether it can recurse.
caching is orthogonal to recursion?
Caching doesn't require/imply recursion.
The term "orthogonal" is meant to be interpreted from a mathematical sense loosely has "the things have nothing in common i.e. separate concepts".
It mean it is one feature is independent with the other one. Or have bothe feature have no influence with the other one. So they can be implemented independantly
in a programming point of view, two orthogonal features
do_work(bool feature1, bool feature2)
{
// do common work
if(feature1)
{ //... do this }
// do common work
if(feature2)
{ // do work }
// do common work
}
or: if they are not orthogonal:
you need to do this: ( and it may have case where you cant combine the two feature.
do_work(bool feature1, bool feature2)
{
if(not feature1 and feature 2)
{ //... do this }
else if(feature1 and not feature2)
{ // do work }
// else impossible or different behavior
// etc..
}
精彩评论