<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[UI/Data Caching]]></title><description><![CDATA[<p dir="auto">I noticed some interesting behavior with while developing my MMM-Surf module. I observed this behavior after I added a “last updated” timestamp at the bottom of the UI. If the MagicMirror software is loaded from different clients (e.g. RPI with screen + web client), each will have a different last updated timestamp. So let’s say I load the RPI+Screen client + 3 web clients, each a minute apart. That will produce 4 unique API requests upon load and then 4 unique API requests when the update window is triggered on each client.</p>
<p dir="auto">Is anyone aware of a way to cache data that is rendered to the UI and hold it for, say, the same timeframe as the update window? This could help reduce hitting API sources and keep things synched across the clients.</p>
<p dir="auto">Thanks in advance!</p>
]]></description><link>https://forum.magicmirror.builders/topic/6984/ui-data-caching</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 07:56:45 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/6984.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 Apr 2018 16:23:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UI/Data Caching on Sun, 22 Apr 2018 12:20:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/e3v3a" aria-label="Profile: E3V3A">@<bdi>E3V3A</bdi></a> that worked perfectly. Thank you for sharing!</p>
]]></description><link>https://forum.magicmirror.builders/post/38724</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/38724</guid><dc:creator><![CDATA[Privacywonk]]></dc:creator><pubDate>Sun, 22 Apr 2018 12:20:38 GMT</pubDate></item><item><title><![CDATA[Reply to UI/Data Caching on Sat, 14 Apr 2018 21:08:46 GMT]]></title><description><![CDATA[<p dir="auto">yeah , you need to save it with a <code>this</code> thing. Someone helped me fix this <a href="https://github.com/E3V3A/MMM-FlightsAbove/commit/20ab121a27c3d0121388bf14a8b356135f525459" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>. So you probably need to do something very similar. (Save the current data, and restore it when someone is trying to use it before the timeout.)</p>
]]></description><link>https://forum.magicmirror.builders/post/38403</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/38403</guid><dc:creator><![CDATA[E3V3A]]></dc:creator><pubDate>Sat, 14 Apr 2018 21:08:46 GMT</pubDate></item><item><title><![CDATA[Reply to UI/Data Caching on Sat, 14 Apr 2018 20:47:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/retroflex" aria-label="Profile: retroflex">@<bdi>retroflex</bdi></a> - that is where all of my API requests reside. MMM-Surf calls the node_helper functions. Whenever the app is loaded it makes new calls.</p>
<p dir="auto">I am looking into node-cache to see if I can integrate that somehow.</p>
]]></description><link>https://forum.magicmirror.builders/post/38401</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/38401</guid><dc:creator><![CDATA[Privacywonk]]></dc:creator><pubDate>Sat, 14 Apr 2018 20:47:50 GMT</pubDate></item><item><title><![CDATA[Reply to UI/Data Caching on Sat, 14 Apr 2018 18:55:04 GMT]]></title><description><![CDATA[<p dir="auto">Put the API request in node_helper.js. MMM-Surf.js is run on client and node_helper.js on server. Keep in mind that there is always only one node_helper instance.</p>
]]></description><link>https://forum.magicmirror.builders/post/38393</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/38393</guid><dc:creator><![CDATA[retroflex]]></dc:creator><pubDate>Sat, 14 Apr 2018 18:55:04 GMT</pubDate></item></channel></rss>