Graph seems generated from nowhere

====================================

Component Version
LibreNMS 1.63
DB Schema 2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
PHP 7.2.30-1+ubuntu16.04.1+deb.sury.org+1
MySQL 10.0.38-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

I have a custom script that polls a number from a device, configured as a service. It is working since ages. Sometimes my script fails for some reason and gets an odd number, generating graph as:


With some semi-white spaces (see 10:50 here). The problem is 99% on the device I poll, so nothing to discuss here.
What I always did was to fix the rrd file. Since they are not editable I created a script that:

  1. Dumps the current rrd to XML
  2. fixes the XML data where the dents occur
  3. generates a new rrd file to replace the original (ans sets the correct permissions)

This removed the white spaces in the graph and worked fine.
Since a couple of weeks (maybe more, I only need that graph sometime) when I do the same thing (literally, it is scripted) I end up with an RRD file that contains the right data (no odd numbers), but the graph I see continues to have the white spaces. The strangest thing is that the file is for sure the right one, since it is currently being updated by Librenms. After I correct the data LibreNMS appends new data and the graph continues to extend in that specific file and graph shows it.
I thought I was updating the wrong file, but the RRD debug says I’m using the right file. Also if I dump that specific file I see the same values I see in the graph, but the graph shows the “old” white spaces while the RRD in the same spot has the correct data. If I manually create a new graph from the RRD (using the debug command) I have no holes, perfect graph. Only LibreNMS generates the graph by that RRD putting the old white spaces that existed at some point but are no longer there.
I use rrdcached so to be sure I added the flush instructions in my script, but nothing changed. Also I had rrdcached since the setup, so nothing new in that respect.
It seems like LibreNMS is still reading the older values from some kind of cache, but I have no idea where this cache can be. Is is not my browser since I tried every browser and also I get the white space even if I generate graphs for specific times around the gap, other than the default 6h/12h/…
Is there anyone with a clue where I should look to see why LibreNMS seems to generate the graph from somewhere that is not the on-disk corrected file?
Thanks