Opening and reloading a stage applies these steps with database calls:
- resolve asset: check asset existence in db
- fetch asset: download asset from db if NEEDS_CACHING
- get timestamp: check asset existence again in db
Fetch asset always does an extra get_raw_timestamp check when the cache says that fetching is not necessary...
Because of this, I think that the get_timestamp call should just return the cached timestamp value without making yet another database query.
I think this line should be dropped: https://github.com/LumaPictures/usd-uri-resolver/blob/master/URIResolver/sql.cpp#L525
This reduces the database queries per unique asset from 3 to 2.