internal/router: add fullySpecified parameter to IdHandler

Also add selective caching to internal/v4.