Follow-up from "perf(redis): clean up redis cache use across codebase"

The following discussion from !1685 (merged) should be addressed:

  • @jdrpereira started a discussion:

    Followup issue (unrelated to this change):

    In registry/datastore/repository.go#L538, we're currently calling cache.Set(ctx, nil) when 1) the repository was not found in cache 2) it was not found in the DB either. This is unnecessary. We should only call cache.Set if it was found on the DB.