Remember identifiers for indexed metadata.

This will make it simpler to add a cacheing layer that caches all
alternative routes to particular metadata.