Clarify some descriptions regarding resource cache#82884
Clarify some descriptions regarding resource cache#82884YuriSizov merged 1 commit intogodotengine:masterfrom
Conversation
|
This is very helpful and much needed! I opened #82830 the other day and it appears that some of the perceived inconsistencies may be expected behaviors. Since I just spent a chunk of time trying (and failing) to effectively use CacheModes, I wanted to share some questions/requests for clarifications that I hope will be useful as feedback coming from a user who does not have experience with this source code. I say this because perhaps some things here may be working as expected and in accordance with the edits in this PR, but just not in a way that would be obvious to a user like me without deeper understanding of the engine. CACHE_MODE_IGNORE:
CACHE_MODE_REUSE:
CACHE_MODE_REPLACE:
In addition, whether resources stored in subresources that are saved externally use the cache or are loaded from disk appears to vary based on the type of external resource. If this is expected behavior, should it be noted here that it can vary by resource type? |
I think PackedScenes might be an exception, especially when you need to instantiate them to reach the subresources.
The description I written was based only on the source code, but it's so convoluted that apparently I got it wrong. From my testing now, CACHE_MODE_REUSE and REPLACE do exactly the same, so no idea what's the difference. Maybe I'm testing wrong. Not sure about the other quirks; they can be left for another PR. |
|
Seems like this PR depends on #84167 now, because the current behavior is wrong. I could document how it's supposed to work, but it might be confusing. |
|
Feel free to update the descriptions now, if it's required! |
640ceb5 to
5a3c738
Compare
5a3c738 to
a1aa1a4
Compare
|
Updated the description of CACHE_MODE_REPLACE. Also removed the mentions of sub-resources, as I'm not that sure about their inner workings. Possibly they are irrelevant for cache mode and should be mentioned somewhere else. |
|
Thanks! |
This PR provides more insight on how resource caching works and also adds descriptions to CacheMode enum values.