Is there a command or method to flush the cache?

frogpipe

Yesterdayz Trainz Member
When tweaking content I'll load it, test it, exit driver and switch to CM (which I keep open) re-open the asset, tweak it, and repeat.

Sometimes it seems my edits don't appear in game unless I go thru several cycles of launching and closing a route.

Its like a cached version of my script or config is persisting after I commit. So I was wondering if there was a way to stop that.
 
Unfortunately there isn't unless you run an EDR (Press CTRL while clicking on Rebuild database). There is bruit force though. Setup a batch to delete the contents of %your user data folder location%\Cache\Libraries.

This will force a reload on start up and should pickup your new script (library).
 
That all sounds a bit less surgical than what I was hoping for. :D

Thanks tho, the EDR might be a thing I'll try but it would take longer that just restarting a route a few times.
 
Have you tried replacing the item you edit before running it? I know it is required with locos if you change the e-spec in any way.

Cheers,
Bill69
 
Thats a fair point, and yes I exit the route back to the session select menu and re-place the loco and cars each time I start the route.

That's just habit. Tho I will use a consist to place them all in one plop at times, those files don't retain anything but the car KUIDs and direction.
 
Create the asset using a new KUID. Game things it’s new asset.
When done developing (or whenever you like) delete the no longer used KUIDs.

You are editing the asset anyway, so changing the KUID and importing it doesn’t take much extra time.

Would that work?
 
Maybe, as a last ditch before deleting files. Its not a persistant problem. Ive just had a few instances where I played with a script, saw no change in behavior, went back and only added print statements to try and suss out what went wrong and when I went back it worked right and had the printing.
 
Hello,

This is certainly an annoying aspect. I always delete the item to be improved and install a new version, instead of overwriting and submitting it. But even then it sometimes happens that the asset appears in its previous incarnation. And this does not only happen when scripts are changed, I think. Sometimes the inconsistency between the previous and the latest version will even CTD the program.
To be sure that I evaluate the latest version of my work, especially when testing script code, I close and restart Trainz. But I think this is all a nuisance and one should have an option to prevent caching.

Regards,
Paul
 
One for the suggestion box(car), a menu option, revealed with advanced developer options on, "Flush Cache".
 
I experience same problem. For me export to cdp, delete and re-install from that cdp is the fastest way.
 
Back
Top