# Caching data between script runs?

**URL:** <https://forum.inductiveautomation.com/t/caching-data-between-script-runs/57275>\
**Category:** General Discussion\
**Created:** [March 16, 2022, 7:08pm UTC](https://forum.inductiveautomation.com/t/caching-data-between-script-runs/57275 "2022-03-16T19:08:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 16, 2022, 7:17pm UTC](https://forum.inductiveautomation.com/t/caching-data-between-script-runs/57275/2 "2022-03-16T19:17:52Z")

</div>

I think this is about as close as you can get.

> [@system.util.getGlobals() not persisted across Designer Save](https://forum.inductiveautomation.com/t/system-util-getglobals-not-persisted-across-designer-save/33869/14):
>
> Ok. New module “Life Cycle” w/ system.util.persistent(name) utility function. For v7.9: [https://www.automation-pros.com/ignition/Life%20Cycle-0.9.0.2004121825.modl](https://www.automation-pros.com/ignition/Life%20Cycle-0.9.0.2004121825.modl) For v8.0: [https://www.automation-pros.com/ignition/Life%20Cycle-0.9.0.2004121920-v8.modl](https://www.automation-pros.com/ignition/Life%20Cycle-0.9.0.2004121920-v8.modl) Test with a project script like this: # project script "Life" g = system.util.persistent('LifeTest') count = g.setdefault('editCount', -1) count += 1 g['editCount'] = count def editCount(): return count Print the return from Life.editCou…

---

_[View the full topic](https://forum.inductiveautomation.com/t/caching-data-between-script-runs/57275)._
