I have a toggle. Every time the toggle is switched, a new random seed is generated in my C# script. However, instead of generating a new seed every time the switch is flipped, my definition in shapedriver returns a cached value, instead of regenerating a new seed. Is there a way to change this behavior?
ShapeDiver caches the result of all the requested parameters to make them load faster the next time they get requested. I would suggest you to use a slider where each time the slider number changes a new random value is generated or a text input.
Is it cached per session or across all users? If it is a slider, and if each position is a seed, if it cached each position it isn’t truly random is it? And text, If the user enters “John”, what is to stop another person from writing “John”? It needs to be completely unique.
Caching happens system-wide, ie across all users. This is a key feature to optimize the performance of the shared systems (free and pro users). Disabling the caching system (and therefore allowing random computations) is available to Enterprise users only at the moment.
Alternatively, you can simulate randomness by adding a ShapeDiverTextInput parameter to your model and send a new random string with each parameter request. That would force the model to bypass the cached solution and compute a new one every time.
I would have to send a random string outside of to ShapeDiver? From an API? With a free tier? Without sending them via API, I don’t see how I would populate the seed; there is no input to the ShapeDiverTextInput except the field the user fills out. The user would have to make up their own random seed…
My bad, I assumed you were using the API. If you are planning to only use the models inside the ShapeDiver platform, then there is no other option than asking users for a random string as input. I will give an update here if the option to disable caching becomes available on the platform, but it will likely be a Pro feature.