# File-based context: does it write even if no changes are made?

**URL:** <https://discourse.nodered.org/t/file-based-context-does-it-write-even-if-no-changes-are-made/8290>\
**Category:** General\
**Created:** [22 February 2019 22:32 UTC](https://discourse.nodered.org/t/file-based-context-does-it-write-even-if-no-changes-are-made/8290 "2019-02-22T22:32:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thatcadguy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thatcadguy/32/5273_2.png) [@thatcadguy](https://discourse.nodered.org/u/thatcadguy)\
**Post date:** [22 February 2019 22:32 UTC](https://discourse.nodered.org/t/file-based-context-does-it-write-even-if-no-changes-are-made/8290/1 "2019-02-22T22:32:38Z")

</div>

The Local Filesystem Context Store has a property called flushInterval that defaults to 30 seconds, and the docs define this as "the minimum interval between writes to storage."

Is this writing to file only when the context has been changed, or is it writing regardless? It's not clear to me from the docs.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 February 2019 22:37 UTC](https://discourse.nodered.org/t/file-based-context-does-it-write-even-if-no-changes-are-made/8290/2 "2019-02-22T22:37:55Z")

</div>

Only when changed. If there is nothing to flush, it doesnt..

---

<div class="post-metadata">

**Author:** ![thatcadguy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thatcadguy/32/5273_2.png) [@thatcadguy](https://discourse.nodered.org/u/thatcadguy)\
**Post date:** [22 February 2019 22:39 UTC](https://discourse.nodered.org/t/file-based-context-does-it-write-even-if-no-changes-are-made/8290/3 "2019-02-22T22:39:38Z")

</div>

Thanks @dceejay, the keyword 'minimum' kind of implies that, but I wasn't sure and didn't want to assume.
