# Perspective Cache and Share Question

**URL:** <https://forum.inductiveautomation.com/t/perspective-cache-and-share-question/97740>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 24, 2024, 4:26pm UTC](https://forum.inductiveautomation.com/t/perspective-cache-and-share-question/97740 "2024-10-24T16:26:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 24, 2024, 4:26pm UTC](https://forum.inductiveautomation.com/t/perspective-cache-and-share-question/97740/1 "2024-10-24T16:26:34Z")

</div>

In the docs, there is a section on caching data client side in Perspective

> **[Perspective Parameters | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/reference-pages/gateway-configuration-file-reference/perspective-parameters#cache-and-share)**
>
> Session Caching

It mentions that setting `-Dperspective.value-cache.max-age` to a different value can control how long the session caches things, but it doesnt really defined "things"

It just says:

> Certain bindings and queries in Perspective will often pull data to see if any values have changed

Any ideas what those "Certain Bindings and queries" might be?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 24, 2024, 5:00pm UTC](https://forum.inductiveautomation.com/t/perspective-cache-and-share-question/97740/2 "2024-10-24T17:00:05Z")

</div>

_Currently_, the alarm journal and alarm status table's model of alarms,  
plus the following binding types _if_ 'cache and share' is enabled in the binding properties.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7fdc3e1a7285d9d89aa08649878f7b83759b3289.png)

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 24, 2024, 5:32pm UTC](https://forum.inductiveautomation.com/t/perspective-cache-and-share-question/97740/3 "2024-10-24T17:32:26Z")

</div>

Regarding your comment of “currently”

It would be nice in the future if it was possible to inject custom things into this cache as well.

Thought I would imagine it’s probably technically possibly with hacky Jython referencing whatever Java classes are doing this

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 24, 2024, 5:34pm UTC](https://forum.inductiveautomation.com/t/perspective-cache-and-share-question/97740/4 "2024-10-24T17:34:47Z")

</div>

> [@kgamble](#):
>
> It would be nice in the future if it was possible to inject custom things into this cache as well.

Sure... what would that look like to you? I think that's just Phil's `xVarMap` or private custom properties, right? Though the latter has the unfortunate side effect of collapsing down to JSON-ish types.

> [@kgamble](#):
>
> client side

Also, to clarify, this data isn't "client side" as in, loaded into the frontend.  
It's just held in memory attached to the Perspective session on the backend.
