Cache the local metadata.

Add a function (and UI command) to rescan local metadata.
Order by priority.