As an IT administrator, it can be challenging to keep your environments stable and sustainable. The corporate network can be a major factor, as an outage can disrupt the environment and impact users. This disruption may cost your organization valuable time and money when trying to get your workforce back to full productivity.

However, the agent caching mechanism in Workspace Environment Management (WEM) can help alleviate these concerns. In this post, we’ll explore the benefits of WEM agent caching and provide some recommendations for configuring this feature.

Benefits of WEM Agent Caching

One of the key advantages of WEM agent caching – for both WEM on-prem and WEM cloud service – is that it can help reduce logon time, thus improving employee experience and satisfaction. With agent caching, agents retrieve relevant settings from their local cache, instead of from the remote database, which speeds up the processing of settings and significantly reduces logon time.

When users get access to the resources they need quickly, they are able to do their best work while alleviating an influx of help desk calls.  

In addition, agent caching improves stability. As noted above, your organization has the potential to lose time and money due to poor network conditions. When there is no network connection, WEM agents can fall back on their local cache automatically to ensure the stability and availability of the WEM service. This means that even if the corporate network goes down, users can continue working without interruption. 

Furthermore, agent caching can also reduce network traffic. With agent caching, relevant settings are cached locally, eliminating the need to connect to the infrastructure service repeatedly. Less network traffic makes for an even better user experience. With all of these great features, it is a no-brainer to start implementing WEM agent caching within your environments.

Let’s take a closer look at configuration best practices. 

Recommended Settings for WEM Agent Caching

Enabling WEM agent caching is a straightforward process, and there are several recommended settings to optimize the balance between stability and user experience. 

Enable Offline Mode

Enabling this option ensures that the WEM session agent (UI agent or command line agent) will continue to process user actions even when it cannot connect to the infrastructure services. Once the network is restored, the WEM session agent can switch back to using settings from the infrastructure services.

Machine-level settings such as system optimization, Citrix Profile Management, and self-elevation will always switch to using local cache automatically when there is no network connection, regardless of whether this option is enabled.

Use Cache to Accelerate Actions Processing

This option can significantly reduce logon times, as the agents no longer need to connect to infrastructure services to retrieve relevant settings. Instead, agents can use the settings in the local cache, resulting in faster processing of actions and a faster logon time.

This option is enabled by default, and we recommend not disabling it, as doing so may cause slow logon times, especially if you have configured many actions in the WEM console. By leveraging cache to accelerate actions processing, users can experience faster logon times and a smoother overall user experience.

You can find both of the options above under the Agent Settings section of the Advanced Settings tab in the WEM console, as shown in the screenshot below: 

Overall, we suggest enabling the above two options, as they can achieve a great balance between availability and better performance.

Choose a Persistent Location for Agent Cache

Two database files are generated under the agent cache location: “LocalAgentCache.db” and “LocalAgentDatabase.db”. We recommend choosing a persistent location for the two database files whenever possible. Here’s the difference between the two:

  • LocalAgentCache.db” contains a lightweight backup of settings in the remote database, and changes in the remote database can be periodically or manually synchronized to this file.
  • LocalAgentDatabase.db” stores temporary or intermediate data of system optimization, machine and session statistics, and usage report raw data. The data in “LocalAgentDatabase.db” is later aggregated and sent to the infrastructure services periodically to generate reports for IT admins to review.

By specifying a persistent location, the “LocalAgentCache.db” file will not be recovered after restarting the machine, and the WEM agent doesn’t need to perform a full synchronization every time the machine starts up. Additionally, choosing a persistent location ensures that local optimization data and statistical data stored in LocalAgentDatabase.db will not be lost after restarting the agent.

WEM will still function well even if you don’t specify a persistent cache location. However, choosing a persistent location can prevent WEM agents from performing full synchronizations every time the machine starts up, resulting in excessive network data usage. By choosing a persistent location, you can achieve optimal performance and ensure that statistical data is not lost.

There are two ways to specify a persistent location for the WEM agent cache files. For example, if you are using Citrix PVS Deployment, you can specify the path of a PVS write cache disk during installation as shown in the WEM management console below. 

Alternatively, you can modify the following registry entry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Norskale\Agent Host

In the registry, set the “AgentCacheAlternateLocation” value to the desired cache file path.

Agent Caching Management Workflow

By default, the WEM Agent Host Service automatically checks cache availability and integrity before using the cache. For example, the cache availability and integrity will be checked during user logon from below three aspects:

  • Non-existence or corruption of cache files
  • Cache files originating from the master or base image that do not match the current agent identity 
  • Outdated cache files that have not been synchronized recently.

As the WEM Agent Host Service manages the cache on its own, IT administrators do not have to manually reset or repair it through logon scripts, which could potentially disrupt the WEM Agent Host Service’s internal workflow.

Try WEM Agent Caching Today!

As you can see, WEM agent caching is a valuable function that can help IT administrators maintain stability and sustainability in their environments. By enabling offline mode, using the cache to accelerate actions processing, and choosing a persistent location for the agent cache files, you can improve performance, reduce network traffic, and ensure a great user experience. Find out more and give WEM agent caching a try and let us know what you think in the comments below!