NetXMS Support Forum

English Support => General Support => Topic started by: Sch.Donat on December 02, 2019, 02:29:12 PM

Title: Is it possible to control NetXMS cache?
Post by: Sch.Donat on December 02, 2019, 02:29:12 PM
Hi!

I have a few questions regarding NetXMS database caching:

Is it possible to turn off caching and set it to write to database instead?
Is the cache flushing time based or data based? If it is time based, is it possible to set the interval?

I'm using custom attributes to store some user specified data, which I need to query from DB. I would like to avoid using the web API.

Best regards,
Sch. Donat
Title: Re: Is it possible to control NetXMS cache?
Post by: Tatjana Dubrovica on December 03, 2019, 04:46:12 PM
Hi,

It is not possible to turn off caching, but you can set synchronization interval by changing server configuration parameter: "SyncInterval".
Title: Re: Is it possible to control NetXMS cache?
Post by: Sch.Donat on December 04, 2019, 07:30:45 PM
Hi!

Thanks for the answer, it works great when I change the Custom Attribute from the NetXMS Management Console via the object properties. I can see the changes after the specified time (in SyncInterval).
Changing Custom Attributes from script, however, doesn't seem to work. I can see the change in the console, but the server doesn't write it to the database. If I restart the server, the change is completely lost (I can't see it in the console anymore).

I use the following script, maybe I'm missing something:

SetCustomAttribute($node, "operationalstatus", "status");

Best regards,
Sch.Donat
Title: Re: Is it possible to control NetXMS cache?
Post by: Tatjana Dubrovica on December 04, 2019, 10:11:52 PM
Looks like a bug I'll check it.

What server version do you use?
Title: Re: Is it possible to control NetXMS cache?
Post by: Sch.Donat on December 05, 2019, 12:55:10 PM
I tried it in the latest 3.0 version (I'll check the exact version in a few hours) and in 2.2.16, I haven't tried it in 3.1 yet.

Edit: server version: 3.0.2357-1 amd64
Client version:  3.0.2329

Best regards,
Sch.Donat
Title: Re: Is it possible to control NetXMS cache?
Post by: Tatjana Dubrovica on December 09, 2019, 12:55:04 PM
This bug is present in both 3.0 and current 3.1. It will be fixed in next patch release.
Title: Re: Is it possible to control NetXMS cache?
Post by: Sch.Donat on December 09, 2019, 01:22:00 PM
Thank you.

Best regards,
Sch.Donat