-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ResourceLoader.CACHE_MODE_IGNORE
does not ignore the resource cache
#59669
Comments
ResourceLoader.CACHE_MODE_IGNORE
does not ignore the resource cache
@Hakunamawatta Can you reproduce this in 3.4.4? |
Partially. If you try to ignore the cache before something is loaded in the cache, then ignoring the cache will save it to the cache.
Whereas this doesn't change the source code of "same" because the cache isn't being used when loading:
But if you load from the cache again after ignoring the cache, then the source code of "same" will change (because it's being saved to the cache).
|
- Unify documentation, hoping to clear misconcepctions about about propagation of the cache mode across dependant loads. - Clarify in docs that `CACHE_MODE_REPLACE` now also works on the main resource (from godotengine#87008). - Add two recursive modes, counterparts of `CACHE_MODE_REPLACE` and `CACHE_MODE_IGNORE`, since it seems some need them (see godotengine#59669, godotengine#82830). - Let resources, even loaded with one of the ignore-cache modes, get a path, which is useful for tools.
There is new |
No. Tested it with 4.3 RC 2 func _ready():
var script = ResourceLoader.load("res://some_script.gd")
var same = ResourceLoader.load("res://some_script.gd", "", ResourceLoader.CACHE_MODE_IGNORE_DEEP)
script.source_code = '#This should not be in "same"'
print("Same: ", same.source_code) Output:
|
Godot version
4.0 (3b4e94c)
System information
Linux Mint 20.2
Issue description
When using ResourceLoader to load resources, CACHE_MODE_IGNORE should ignore the cache. At least for scripts, it seems to use the cache regardless. If the script is loaded with CACHE_MODE_IGNORE before there is anything in the cache, it adds the resource to the cache.
Steps to reproduce
Minimal reproduction project
Cache.zip
The text was updated successfully, but these errors were encountered: