Where are interactive app form values actually cached?

Greetings – Where are the submitted form values cached? I find that the cached values are available to a separate browser as soon as submission occurs, and so it must be cached to disk - I just can’t see any files within my ~/ondemand that are updated.

Thank you in advance,
~ Em

On our system they are in the user’s home directory as

$HOME/ondemand/data/sys/dashboard/batch_connect/sys/<application

/output/

So, for bc_desktop_basic, I have my latest job’s data at

$HOME/ondemand/data/sys/dashboard/batch_connect/sys/bc_desktop_basic/output/f67cbbb3-a878-4322-abe3-d622b423b8c2

Does that help?

Yes, Bennet – I think that helps. So the form inputs are written to user_defined_context.json, and then subsequent visits to the page hosting that app form will retreive from the most recent content directory in output? Thanks a lot, I feel better prepared now to think about the options for configuring the caching discussed in User Form — Open OnDemand 2.0.5 documentation

Cheers,
~ Em

I believe that the user_defined_context.json file is unique to each job, as it contains the values the user entered in the form prior to submitting the job.

I believe the browser will cache values for form fields after the user successfully submits their first job, and when the user returns to the form, the browser will populate the fields. Perhaps that is the ‘caching’ you mean?

I don’t think the OnDemand server is caching from session to session or job to job. It does write out the data for each job in those directories so you can see what the options were when submitted.

I suppose that’s possible. What I have done is to open the form for an app in firefox, select values different from those presented in the form (cached already somewhere), submit the form, and then open the form for that app in chromium. The app form in chromium populated with the updated form values that I had just used when submitting the form in firefox. I concluded that the values were stored on disk in ondemand, and not cached in the browser.

I may well be misinterpretting these results, or in fact the ff/chromium test itself based on flawed reasoning. Thanks for continuing the discussion.

You were so close! Here is the file you’re looking for (with the being specific to any given app). Yes @bennet is right that anything under output is specific to that session, but above that output directory there’s this file that we read when we render the page (corrupt this file and you’ll see the error that it couldn’t be read and we won’t cache any values).

~/ondemand/data/sys/dashboard/batch_connect/sys/<APP>/context.json

Thanks, Jeff, much appreciated!
We almost got there, Bennett (: