Storing cache file when using F.linear_tip_spot_generator

(New topic, breaking off from different post)

I’m using the method below to loop through tips. I have a separate generator for each tip type (1mL, 300uL, 50uL). Running linear_generator.set_index(0) resets the generator, which is very helpful for testing. (Shoutout @rickwierenga - you were correct, I had not pulled the latest plr version)

The function also generates a cache.json file. What do folks typically do with these? I have three files (one for each generator/tip type) and they sit in the folder/repo. Would it make sense to save these files and use them between scripts? Or would best practice be to delete them after running? I’m sure there are multiple solutions, just curious what others are doing!

1 Like

the cache_file_path is an optional parameter, default is None, for storing the index in the tip tracker between runs. When None, no file is generated. I would definitely suggest using unique filenames for each generator, and possibly use unique filenames for each protocol so that they don’t interfere. These files are useful if you have tips on the deck that you don’t change between runs, it will remember which tips you already used. If you do reload tips in between runs, it makes sense to either delete the file or to set the index to 0 at the start of your protocol.

also, this is a actually path: you can specify folders like protocol-a/cache-50ul.json, or \ on the other OS.

2 Likes