The commentators discuss the difference between Yehoshua and Kalev in the way they reacted to the meraglim and the way they are treated in the Parsha. Yehoshua was known to be Moshe Rabbeinu's disciple and would not have been believed had he attempted to pretend that he was going along with them. Had he attempted to try this policy, he would not have been allowed to back out and the damage to the community would have been immense. His obvious opposition to the meraglim could have led to his death as a result of "friendly fire". As a result, Moshe Rabbeinu had to daven for him and change his name from Hoshea to Yehoshua.
On the other hand, Kalev was able to successfully pretend to go along with the meraglim and then attempt to give the Bnei Yisrael the truth. Shakespeare illustrated this technique with his famous "I come to bury Caesar, not to praise him" speech, given by Marc Antony in Act III, scene 2 of the play Julius Caesar. In fact, he may have gotten the idea from Kalev. In order to do this, Kalev went to the Mearas HaMachpela in order to daven for the strength to resist the meraglim and to be able to do what was right. He needed this as the longer the pretense went on, the harder it would be to recognize that the moment had come to drop the pretense and speak out openly.
There is a famous study (http://www.age-of-the-sage.org/psychology/social/asch_conformity.html) performed by Solomon Asch in 1958, in which a group of people where asked which of three lines was the same size as a reference line. All the participants except one were deliberately primed to give an obviously wrong answer.
To Asch's surprise, 37 of the 50 subjects conformed themselves to the 'obviously erroneous' answers given by the other group members at least once, and 14 of them conformed on more than 6 of the 'staged' trials. When faced with a unanimous wrong answer by the other group members, the mean subject conformed on 4 of the 'staged' trials.
Thus, since Yehoshua was going to be by himself, he needed the extra strength in order to maintain the correct position.
On the other hand, Kalev was able to rely on Yehoshua as an "ally". The Asch study found.
However, the subjects conformed much less if they had an "ally" In some of his experiments, Asch instructed one of the confederates to give correct answers. In the presence of this nonconformist, the real subjects conformed only one fourth as much as they did in the original experiment.
As a result, Kalev was able to strengthen himself in order to attempt to stop the destruction. He still needed to daven at the Mearas haMachpels in order to ensure that he had the strength to recognize the time to make his move. The main flaw in this tactic is that one must recognize that it is time to make the move. One could continue to delay with the rationalization that one is "working from within" or will make the attempt later when it is "more likely to succeed". This is similar to what happened before World War II. Prime Minister Neville Chamberlain thought that he would be able to use "quiet diplomacy" to prevent the coming war. Instead, he convinced the dictators that they could win.
Kalev knew that this was the poblem that he would face and that is why he went to "kever avos". The avos not only had the strength to fight against the rest of the world, but the wisdom to choose the appropriate tactics. This is why Hashem calls Kalev "avdi", my servant, one of the few people in the Torah to actually earn that title.On the one hand, one needs to "follow orders" and do everything that Hashem wants us to do, just as we learn about Aharon lighting the Menorah. On the other hand, one must be intelligent enough to recognize the appropriate tactics required to accomplish the strategy encompassed by "doing the will of Hashem".
This is the lesson of Yehoshua and Kalev. They used different tactics to accomplish the same strategy.