MV Removing specific items from cache.

I currently use Galvs image Cache and I was wondering if there was a way to remove an item from cache after you are done with it. I came across this script in the big script call list:
JavaScript:
var path = 'img/characters/!Schaden.png';
var key = ImageManager._generateCacheKey(path, 0);
delete ImageManager._imageCache[key];

But I can't seem to get it to work. Does this still work in MV or am I just doing it wrong? Any advice would be greatly appreciated.
it depends where you got and how the function is used.
if you use that as scriptcall, it might not work.

do you have a link to the plugin that has it?
.

do you have a link to the plugin that has it?
I didn’t get it from a plugin, it was on this script call list.



Is the section I got it from just for writing plugins and not for in came script calls?
than I have no clue, I dont use it, so its hard to tell as it seems correct.
the only issue if it doesn't work is, is the file name exactly the same?

if it is, than I dont know what you did wrong.
Are you sure Galv's plugin doesn't have its own cache and you need to be calling a plugin-specific command/script call?
than I have no clue, I dont use it, so its hard to tell as it seems correct.
the only issue if it doesn't work is, is the file name exactly the same?

if it is, than I dont know what you did wrong.
I see, I wonder if another Plugin is interfering with it. I'll try it in a fresh project when I get home tonight.

Are you sure Galv's plugin doesn't have its own cache and you need to be calling a plugin-specific command/script call?
Using the console I can see when the galv command puts it in the cache, so unless its making a separate cache and storing it in two locations, I don't know. But I tried it with other objects not utilizing Galvs cache at all and still no luck. Yeah, I'll definitely try it with a fresh project later tonight.

Thank you both for your responses.
Huh...I think that might be a typo, try this instead:
JavaScript:
var path = 'img/characters/!Schaden.png';
var key = ImageManager._generateCacheKey(path, 0);
delete ImageManager._imageCache._items[key];
if that will solve it, and forgot to add in that list with " ._items "
than it should be fixed in the list, as I had no clue on that part.

but nice catch ^^ (if it does indeed work)
Huh...I think that might be a typo, try this instead:
JavaScript:
var path = 'img/characters/!Schaden.png';
var key = ImageManager._generateCacheKey(path, 0);
delete ImageManager._imageCache._items[key];
That seemed to have worked! Thank you so much!!!!
That seemed to have worked! Thank you so much!
Great! I've corrected that entry in the Script Call List. 👋

(It was probably my typo in the first place...)

Original thread: https://forums.rpgmakerweb.com/threads/removing-specific-items-from-cache.162263/