HashIdentifierExceptVersion
Computes a hash for a given identifier, excluding the version from the hash calculation. This supports cache hits across different versions of the same resource.
def HashIdentifierExceptVersion(
ctx: context.Context,
id: *core.Identifier
) - > string
Computes a hash string for a given identifier, excluding the version field. This function is used to support cache hits across different versions of the same resource by ensuring that the hash remains consistent even if the resource's version changes.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and deadlines. |
| id | *core.Identifier | The identifier object for which the hash needs to be computed. Its ResourceType, Project, Domain, Name, and Org fields will be used for hashing. |
Returns
| Type | Description |
|---|---|
string | The computed hash string for the identifier, or an empty string if an error occurs. |