Use cached data when updating classes
The environment_class_cache_enabled
setting specifies whether
cached data is used when updating classes in the Puppet Enterprise (PE) console. When true
, Puppet Server uses file sync when refreshing classes, which
provides improved performance.
The default value for
environment_class_cache_enabled
depends on whether
you use Code Manager:
- Without Code Manager, the default value is
false
(disabled). - With Code Manager, the default value is
true
(enabled).
When enabled, file sync automatically clears the environment cache in the background. This means you don't have to manually clear the environment cache if you're using Code Manager.
environment_class_cache_enabled
to true
, you must make sure your chosen code
deployment method (such as r10k) clears the
environment cache when it completes code deployments. If the environment
cache isn't cleared, the Node Classifier service doesn't receive new class
information until the Puppet Server service is
restarted.You can use Hiera to
toggle the environment_class_cache_enabled
setting.
- Open your default Hiera
.yaml
file in a text editor.For information about Hiera data files, including file paths, refer to Configure settings with Hiera. - Add the
jruby_environment_class_cache_enabled
parameter, and set it to eithertrue
(enabled) orfalse
(disabled). For example:puppet_enterprise::master::puppetserver::jruby_environment_class_cache_enabled: true
- Save the file and run
puppet agent -t
to compile the changes.