LabVIEW User Cache Value Remains Unchanged After Clearance

Updated Dec 3, 2024

Reported In

Software

  • LabVIEW

Issue Details

  • After using the LabVIEW Clear Compiled Object Cache to clear the User Cache, I see no change in the value reported, I see it is expected the User Cache to not reduce the size to zero, but I see no change. What does the User Cache storage and why is this value not changing after clearance?

Solution

The LabVIEW User Cache contains any loaded VI outside the LabVIEW folder (C:\Program Files\National Instruments\<LabVIEW Version> for 64 bits versions or C:\Program Files (x86)\National Instruments\<LabVIEW Version> for 32 bits versions). Custom VIs and also VIs from drivers/toolkits that are part of LabVIEW Addons (C:\Program Files\NI\LVAddons) are included in the User Cache. 

 

When the Clear button is selected for the User Cache, all the custom VIs outside of the LabVIEW folders and that are not part of the LabVIEW Addons will be removed from the SQLite3 database LabVIEW uses behind (see Additional Information for more details regarding this database).  Not clearing the cache for the LabVIEW Addons is intended behavior so VIs related to LabVIEW Addons will remain in the SQLite3 database. 

 

Even though the custom VIs are removed from the SQLite3 database, the Clear Compiled Object Cache User Interface will still report the same value, and the database file associated with the user cache will not be reduced either, this is a LabVIEW limitation since SQLite3 does not compact the database file after every clear. The workaround to address this issue would be to delete manually the file associated with the User cache located in the following folder: C:\Users\<user name>\Documents\LabVIEW Data\VIObjCache this will let the User Cache dialog box report consistent data and also to reclaim disk space if needed. LabVIEW has the capabilities to regenerate the User Cache in a reliable way in subsequent executions.

Additional Information

LabVIEW uses SQLite3 for storing User Cache VIs, when deleting data in SQLite3, the disk space it occupies is not deallocated. This is because SQLite3 uses a write-ahead log (WAL) to ensure transactional consistency, and the deleted data is marked as deleted in the WAL but not removed from disk.