ynput / ayon-usd-resolver

Home of AYON USD resolver plugin
Apache License 2.0
5 stars 0 forks source link

[Feature Request]_Rework_assetIdent #18

Closed Lypsolon closed 1 week ago

Lypsolon commented 1 month ago

Description

This feature aims to rework assetIdent to expand its functionality as a cacheEntety and make it easier to use and more versatile.

Link to the current Struct https://github.com/ynput/ayon-usd-resolver/blob/8e681a95b756ed0cf458bb14f9d10a785c87de22/src/AyonUsdResolver/resolverContextCache.h#L19

Rationale

cache entity re-evaluation

Currently, we cannot invalidate a cache entity so that it gets re-evaluated when encountered.

file structures

We should move the cache entity object to its file to keep every file isolated for its purpose.

Proposed Solution

Add a function re_evaluate() and add private variables to make sure the function is the main way of getting the data.

Alternatives Considered

Global or per object invalidation via external calls (already implemented via removeCachedObject and clearCache respectively) but its means that cache invalidation need to be done from the outside.

Additional Context

No response

Impact

No response

Assumed Complexity

No response

Impact Scale

No response

Other tools that get touched

No response

Is there an existing issue with this?

Are there any labels you wish to add?

Lypsolon commented 1 month ago

Let's consider adding a handle to store what root_replace option has been used within the cache_entety.

Lypsolon commented 1 month ago

There should be an option to mark an asset_itent as static when it is constructed so that it can not be overwritten.