Local Cache
Local cache stores validation and generation data on your machine. This improves performance by avoiding repeated calculations and reloads during your current session or across sessions on the same system.
The local cache is enabled by default and requires no additional configuration to start using it.
How to Configure Caching?
The local cache location is managed automatically by DaVinci Configurator Classic.
Cache Storage
You can customize the cache storage location where cached data is stored.
Cache storage location:
-
Default Location:
%LOCALAPPDATA%\Vector\DaVinci\dvcfg\cache(Windows) or~/.local/state/Vector/DaVinci/dvcfg/cache(Linux) -
Custom Location: Set via environment variable
DVCFG_CACHE_LOCATION(directory path)
set DVCFG_CACHE_LOCATION=C:\MyCompany\CacheData
export DVCFG_CACHE_LOCATION=/opt/my-company/cache-data
|
Do not manually modify the local cache storage content. Manual modifications can break the caching functionality and lead to inconsistent behavior. |
Advanced Settings
You can configure advanced cache settings using a cache configuration file in JSON format. The cache configuration file is optional - if it does not exist, default values are used.
Configuration File Location
-
Default Location:
%USERPROFILE%\.DaVinciCfg\cache_config.json(Windows) or~/.DaVinciCfg/cache_config.json(Linux) -
Custom Location: Set via environment variable
DVCFG_CACHE_CONFIG_LOCATION(directory path, filename is alwayscache_config.json)
set DVCFG_CACHE_CONFIG_LOCATION=C:\MyCompany\DaVinciConfig
export DVCFG_CACHE_CONFIG_LOCATION=/opt/my-company/davinci-config
Configuration File Format
{
"version": "1.0",
"general": {
"maxFileSizeInMb": 100
}
}
Configuration Options
version(string)-
Configuration schema version (currently "1.0")
general(object)-
General cache settings (optional)
general.maxFileSizeInMb(number)-
Maximum file size in MB for cached objects (optional, default: 2048 MB). Files larger than this size will not be cached.
Disable Cache
You can disable the cache using the DVCFG_CACHE_DISABLED environment variable:
set DVCFG_CACHE_DISABLED=true
export DVCFG_CACHE_DISABLED=true
The DVCFG_CACHE_DISABLED variable must be set to exactly true (case-insensitive) to disable the cache.
Any other value will not disable caching.
When the cache is disabled:
-
No data will be read from the cache
-
No data will be written to the cache
-
All validation and generation operations will perform full calculations
|
Changes to cache configuration require a restart of the DaVinci Configurator Classic environment to take effect. |
How to Verify Caching?
To verify that caching is working correctly:
-
Perform a validation or generation operation on your project
-
Repeat the same operation without changing input data
-
The second operation should complete faster
|
Depending on the operation and the configuration of your project and BSW Package, caching benefits may manifest as reduced resource usage (CPU, memory) rather than faster execution time. Both are indicators that the cache is working correctly. |
Troubleshooting
Configuration File Not Found
Symptom: Custom cache settings are not applied.
Reason: The cache configuration file does not exist at the specified location.
Fallback: Default values are used for all cache settings.
Solution: This is normal behavior if you have not created a cache configuration file.
If you want to customize cache settings, create a cache_config.json file at the default or custom location as described in Advanced Settings.
Invalid Configuration Path
Symptom: Custom cache settings are not applied, and an information appears in the log:
Using the default cache configuration file path as the path defined in the environment variables is invalid. Environment variable file path: <path-from-env-variable> Default cache configuration file path: <default-path>
Reason: The path defined in the DVCFG_CACHE_CONFIG_LOCATION environment variable is invalid.
Fallback: The cache configuration file is searched at the default location instead.
Solution:
-
Verify the environment variable contains a valid directory path (see Advanced Settings)
-
Ensure the directory exists and is accessible
-
Check for typos in the path
Configuration File Cannot Be Loaded
Symptom: Custom cache settings are not applied, and an information appears in the log:
Reading the cache-config.json file failed. Please check the format: <config-file-path>
Reason: The cache configuration file exists but cannot be read or parsed.
Fallback: Default values are used for all cache settings.
Solution:
-
Ensure all required fields are present (see Configuration Options)
-
Verify that field types are correct:
-
version: string -
general: object -
general.maxFileSizeInMb: number
-
-
Check file permissions (file must be readable)
-
Verify file encoding is UTF-8
-
Validate JSON syntax using a JSON validator
Cache Not Being Used Despite Being Enabled
Symptom: Cache is enabled (confirmed by log message), but operations don’t seem to benefit from caching.
Reason: Input data or environment changes invalidate cached results.
Fallback: Cache entries exist but are not used because they are outdated.
Solution:
-
Verify if the tool version has changed
-
Check if input files have been modified
-
See How is Cache Data Kept Up-to-Date? for detailed criteria on when cached data is invalidated
-
This behavior is normal when working with frequently changing data
Corrupted Cache Data
Symptom: Unexpected errors during validation or generation operations, or inconsistent results. A message appears in the log:
Cache encountered a fatal error and may not work as intended. Please manually trigger a cleanup of CFG internal cache.
Cause: <error-details>
Reason: Cache data may have become corrupted due to manual modifications, system issues, or disk errors.
Impact: Operations may fail or produce incorrect results.
Solution:
-
Delete the cache storage directory to clear all cached data (see Cache Storage)
-
Restart DaVinci Configurator Classic
-
Re-run your validation or generation operations to rebuild the cache
-
Avoid manually modifying the cache storage content
Maximum File Size Exceeded
Symptom: Some files are not cached, and a message appears in the log:
Cache encountered a fatal error and may not work as intended. Please manually trigger a cleanup of CFG internal cache.
Cause: The maximum cache file size was exceeded.
Maximum file size: <size> megabyte(s)
Reason: A file exceeds the configured maximum file size limit (maxFileSizeInMb).
Fallback: The specific file is not cached. Other files within the size limit continue to be cached normally.
Solution:
-
If the file should be cached, increase
maxFileSizeInMbin the cache configuration file (see Advanced Settings) -
Review the default maximum file size (2048 MB) in Configuration Options
File to Cache Does Not Exist
Symptom: Caching operation fails, and a message appears in the log:
Caching file failed. File to cache does not exist. Shortened key: '<key>', Path: <file-path>
Reason: The file that should be cached was deleted or moved before the caching operation completed.
Impact: The specific file is not cached. This may indicate timing issues or file system problems.
Solution:
-
Ensure files are not deleted during caching operations
-
Check for disk space issues
-
Verify file system integrity
-
If the problem persists, contact support with the log file