# Persistent context storage

**URL:** <https://discourse.nodered.org/t/persistent-context-storage/37858>\
**Category:** General\
**Created:** [22 December 2020 00:15 UTC](https://discourse.nodered.org/t/persistent-context-storage/37858 "2020-12-22T00:15:59Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 December 2020 00:54 UTC](https://discourse.nodered.org/t/persistent-context-storage/37858/2 "2020-12-22T00:54:52Z")

</div>

> [@FatPilot](#):
>
> Does it only flush if there has been an update or is it as per the flushInterval irrespective?

See this post by Nick...

> [@Working with local storage for Context, Flow and Global Variables](https://discourse.nodered.org/t/working-with-local-storage-for-context-flow-and-global-variables/36320/4):
>
> When you call set on the file system store, if its in synchronous mode, it updates the in-memory cache, then, if there is a pending write already queued up, it just returns. Otherwise, it schedules a write to disk of the cache in 30 seconds time (or whatever you've configured its flush interval to). That means: if this is the first write to context you've done since the last flush to disk, then the write to disk will happen in 30 seconds time. if you'd done a write to context 28 seconds ago …

---

_[View the full topic](https://discourse.nodered.org/t/persistent-context-storage/37858)._
