Uninstalling: Beware of caching

This morning, I decided to clean up a stale, old Drupal website. However, I found that no module could be uninstalled. They appeared ready to be uninstalled, but when I ticked their boxes and clicked the “Uninstall”-button, it just reloaded the same page. No error messages in the watchdog log, and no PHP error messages on the screen (I had full error reporting enabled).

After some digging around (GIYF), it looked like caching might be the source of the problem, It turned out that I had set up memcache, but at one point it broke (software rot?). It turned out that when I did disable it, I had not removed the memcache-configuration in settings.php. After removing this, I was able to uninstall again.