Better metadata cache handling

From https://github.com/praekelt/aludel/pull/7#issuecomment-34430846.