# Where are interactive app form values actually cached?

**URL:** <https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650>\
**Category:** Get Help\
**Tags:** question\
**Created:** [August 26, 2021, 7:05pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650 "2021-08-26T19:05:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![emily.dragowsky](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@emily.dragowsky](https://discourse.openondemand.org/u/emily.dragowsky)\
**Post date:** [August 26, 2021, 7:05pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/1 "2021-08-26T19:05:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bennet](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bennet/32/333_2.png) [@bennet](https://discourse.openondemand.org/u/bennet)\
**Post date:** [August 26, 2021, 8:09pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/2 "2021-08-26T20:09:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![emily.dragowsky](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@emily.dragowsky](https://discourse.openondemand.org/u/emily.dragowsky)\
**Post date:** [August 26, 2021, 8:41pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/3 "2021-08-26T20:41:18Z")

</div>

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](https://osc.github.io/ood-documentation/release-2.0/app-development/interactive/form.html#caching-form-items)

Cheers,  
~ Em

---

<div class="post-metadata">

**Author:** ![bennet](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/bennet/32/333_2.png) [@bennet](https://discourse.openondemand.org/u/bennet)\
**Post date:** [August 26, 2021, 9:25pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/4 "2021-08-26T21:25:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![emily.dragowsky](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@emily.dragowsky](https://discourse.openondemand.org/u/emily.dragowsky)\
**Post date:** [August 26, 2021, 9:32pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/5 "2021-08-26T21:32:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [August 26, 2021, 9:37pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/6 "2021-08-26T21:37:34Z")

</div>

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).

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

```

---

<div class="post-metadata">

**Author:** ![emily.dragowsky](https://avatars.discourse-cdn.com/v4/letter/e/c68b51/32.png) [@emily.dragowsky](https://discourse.openondemand.org/u/emily.dragowsky)\
**Post date:** [August 26, 2021, 10:01pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/7 "2021-08-26T22:01:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 3:42pm UTC](https://discourse.openondemand.org/t/where-are-interactive-app-form-values-actually-cached/1650/8 "2022-05-26T15:42:48Z")

</div>

Closed on May 26, 2022, 3:42pm UTC


