Node-red-contrib-infocache missing

Hi all,
I'm trying to use UI Builder, but I'm not able to install [node-red-contrib-infocache] module.
It isn't possible neither by Node-Red palette neither by npm install, it seems that this repo is missing in npm registry.

It is replaced from other contrib module (i.e. node-red-contrib-cache) ?
Or there is another way to install it?

Please @TotallyInformation could you help me?

Thanks in advance

This has not been published because it is a future project. I started the code but found quite a lot of edge-cases that I haven't had time to figure out.

Use the examples in the library and in the WIKI on how to use a simple function node to provide a Cache.

Thank you TotallyInformation for this prompt reply.

I tried your example in Wiki page:

but itsn't working in my flow.
When I refresh the page by browser I lose inserted data (for example).

I have miss some cache setting in node-red settings?

Thanks in advance

Hi @TotallyInformation,
I checked in debug ctrl message that topic is missing, whereas function node to manage cache expects topic set in input.

This is the first row in the function:
// Expects input msgs with topic set

This could be the problem? I have to add a topic in sent ctrl messages from UIBuilder node?

[quote="GPG, post:3, topic:30858, full:true"]
I tried to use topic field in Node-Red node (with Name and URL), but without success: when I refresh the page I lose typed content.

Thanks in advance

As described in the documentation, the 2nd output port of uibuilder sends the control msgs with appropriate data. Are you saying that you aren't getting anything out of the control port?

I have message from control port.

Please refer to attached images (flow and control msgs).
I have msg in home controls debug, but no msg in input messages debug (I think I'm in return rull fuction section).

I set also topic ("home") in UIBuilder node, but when I refresh the web pase I lose typed data and button counter.![ctrlmsg3|427x335]
(upload://34QWxOZlr5e6s7DX7gwsCi2PRkr.png) ctrlmsg2 ctrlmsg1

Hi @TotallyInformation,
I solved used other example:

Now I'm able to save info in cache, so they are reloaded after page refresh.

All cached informations must be sent to cache node in order to be saved for future refresh.
Is it correct?

Thanks a lot for your support.

Yes, that is how any cache works. You send it information and it saves (caches) it. the CACHE-REPLAY control message from the client is your signal to replay the cache.

You don't have to cache by topic of course, that is only 1 approach. How you cache things depends on your front-end interface and that is one of the reasons that the cache node is stalled - because caching can get very complex. It turns out to be much easier to do a cache in a function node than a custom one :scream:

Might it make sense at this point to spell out in the Wiki for uibuilder that while the infocache node will probably be the solution in the future, at least for now, the other options are the best available at the moment?

Good point, and done. Thanks.