Data Cache in Resgate

#1

Hello everyone,

When we started using Resgate recently, we noticed that Resgate seems to buffer data in some kind of cache.

Is there an option to deactivate this data buffering or limit the size of the cache?
We are slightly worried that it might consume a large portion of our limited resources once we start passing around more objects.

Best regards

Judi

#2

Hi!

Resgate does cache data that is currently subscribed by any of its clients, and it will keep it cached for a short while after the last client unsubscribed to that resource or disconnected.

It is currently not possible to disable this functionality, as it is also part of the recovery mechanism.
There are plans to enable caching to storage, and not only use in-memory caching, but I am not sure that would be sufficient for you.

Some general tips (see what applies to you):

  • Subscribe on demand. Get the data when it is time to view it, and release it (off()) when no longer in view.
  • Use pagination or similar for large portions of data (similar to the suggestion above).
  • Avoid duplicate resource IDs for identical data.
  • Install more RAM :grin:
  • Load balance between multiple Resgate (see here) servers.

I don’t know your exact use case, but if I knew more I might be able to help better.

Best regards,
Samuel