"what the British learned earlier in the century"

For the British Empire, Afghanistan was considered a serious threat to their "jewel in the crown", India.  Britain feared invasion by the Afghans, or by Russians through Afghanistan during the era of strategic rivalry known as "The Great Game".  Consequently, Britain attempted to gain control of Afghanistan over a period of decades, fighting three Anglo-Afghan wars.

The first war (1839-1842) resulted in the destruction of the British Army during its devastating winter retreat from Kabul.  Only one Briton escaped.  The second war (1878-1880) was a British victory, and resulted in Britain gaining control over Afghan foreign affairs, an important advantage in the struggle with Russia. 

The third war (1919) began with an Afghan invasion of British India, a serious challenge for British defenders so soon after the Great War and the Amritsar Massacre.  It lasted just a few months and resulted in the British repelling the invasion but losing their control of Afghan foreign affairs.  Consequently, Afghans celebrate their "Independence Day" on 19 August, the day Britain signed the Treaty of Rawalpindi establishing the furthest boundary of the Empire at the Khyber Pass.