While quick, if we already have the username available, the API call URL should include it to avoid that small delay.
One drawback worth mentioning though - should two posts reference the same Gist, but one with a namespace and one without, then the results will be stored under different transient keys. If that takes priority, then we can stay as we are, not including the username at all, and let GitHub handle any redirects it wants to now or in the future.
Good point about the double storage. The username is really only going to come into play with the oEmbed method, so we'll just let GitHub handle the redirects.
As per @bradyvercher's suggestion.
https://gist.github.com/a8cd3a1066d8047a6187.json#file-foo-bar-php
^ That automatically gets redirected to https://gist.github.com/GaryJones/a8cd3a1066d8047a6187.json#file-foo-bar-php
While quick, if we already have the username available, the API call URL should include it to avoid that small delay.
One drawback worth mentioning though - should two posts reference the same Gist, but one with a namespace and one without, then the results will be stored under different transient keys. If that takes priority, then we can stay as we are, not including the username at all, and let GitHub handle any redirects it wants to now or in the future.