It's really rather staggering how little we've learned, the only consolation being that Cameron has slight overall influence. The most obvious lesson from both Afghanistan and Iraq is that when you start talking about decades long conflicts, put foreign troops on the ground and talk of "conquest", as the French have been, you're inviting a self-fulfilling prophecy. Western intervention is the equivalent of a red rag to a bull to jihadists: the insurgency in Iraq could not have been sustained for so long if it hadn't been for foreign fighters and funding, the chief attraction being the opportunity to try to kill Western soldiers. With the draw down in Afghanistan fast approaching, Mali could well turn out to be the most attractive place for those suitably inclined to travel to.
As Jason Burke explains, al-Qaida in the Islamic Maghreb is a tiny section of the franchise, estimated to have only several hundred fighters. It has shown no inclination to attack the West, unlike al-Qaida in the Arabian Peninsula, even if the death of Anwar al-Awlaki has had an impact on that section. Similarly, despite having previously been involved with AQIM, Mohktar Belmohktar is more of a bandit than an out and out ideologue, and the chief aim of the attack was likely to have been monetary, as it has been in the past. Whether they bargained on the Algerians launching such a deadly assault or not, their managing to hold out for three days is bound to excite opinion on the jihadi forums.
As for the Islamist groupings involved directly in Mali, it seems dubious as to whether they had or have any international ambitions, although we were right to be concerned of the potential for a safe haven to have been established for jihadis had they took full control of the country. This said, despite all the warnings about the Somalia and the initial success of al-Shabaab there, there's little to suggest that any Westerners who travelled there to train and fight have since returned with designs on attacks here (although the group did claim responsibility for an attack in Uganda). After years of exaggeration, we have reached a point where even the most hysterical of terror "experts" admit that threat has been significantly lowered.
Why Cameron then wants us to think that we've got to start over again only this time in north Africa is perplexing. He has no intention of doing anything in Mali beyond giving the French moral support and the odd supply plane, and yet he seems to be implying that the threat posed by these disparate groupings, almost all driven by nationalist rather than internationalist motives, are an "existential" threat. It may well damage British business in the region, which seems to be the only thing that Cameron and the Tories truly care about, as his frequent fluffing trips with arms companies suggest, but the attack on In Amenas will be difficult to replicate, such will be the increase in security at similar operations. It's certainly nothing that the oil and gas companies' balance sheets can't handle.
All of which leads one to suspect that Cameron's finally discovered his inner Tony Blair. Having started out ridiculing Blair's doctrine, he's come to the conclusion that things are so grim on the home front that he has to radiate leadership abroad instead. Never mind that Blair came to be loathed precisely for this reason and it increased Gordon Brown's control over policy on home affairs, by projecting an image as a strong figure on the world stage, especially when Brits are caught up in things they know little of, Cameron hopes to shrug off his otherwise falling ratings. After all, it can't be that he really believes what he's saying, can it?