When you make an update to a Visualizer's Liquid Content, after publishing the old content is still displayed. This is due to the caching mechanism of Liquid Content.
- Access to a SuperUser account.
To improve the performance of the microservices architecture, Liquid Content™ (LC) utilizes aggressive caching to reduce the number of API calls. In most cases, this cache will be instantly cleared when a change is made by a content author. However, sometimes the cache is not cleared and the updated content is not displayed in the Visualizer module until the cache naturally expires.
The following is a series of actions you can take, based on ease-of-execution.
- Clear your browser cache. The simplest action but this will only resolve the issue if the content was cached at the browser level, which is rarely the case with Visualizers.
- Clear the server cache. Another simple step with a low impact on site performance. If you have a web farm or other more complicated environment, it may be worth waiting until non-peak hours to see if clearing the cache has any noticeable impact on server performance. This does not clear the LC cache mentioned above and therefore, also has a low likelihood of resolving the problem.
- Clear the module output cache. Also low impact, but only applies if module output cache is enabled specifically on the module in question. This action is important to mention because this cache would persist even after the LC cache was cleared by normal means.
- Clear the page output cache. Again, it only affects the issue if page output cache has been enabled on this page, and you are viewing the content as an unauthenticated user.
- Make another update to the Visualizer content. This should force the cache to be refreshed if the cache failed to refresh the previous time you edited the content for some reason such as a network connectivity issue.
- Manually invalidate the LC cache via the database. If you are this far down the list, then the easy suggestions didn't work. This action has a very high chance of working but requires some additional consideration explained below.
Liquid Content™ Cache Mechanism Invalidation
The Visualizer module stores what is shown in the module view with a persistent cache located within a dedicated database table called StructuredContent_Visualizers_RenderResult.
The Valid column determines if the content stored in the cache is up to date or obsolete. When Valid is false, a page with a Visualizer will request a new rendering operation from the Structured Content API. In case this operation cannot be performed due to a network or microservice issue, Evoq will show the obsolete content stored in the database.
Cache invalidation can be forced by updating the corresponding Valid field to False and then clearing the server cache. On the next page view event, the application will request a new rendering operation from the Structured Content API.
The steps to accomplish this are as follows:
- Make a backup of your database.
- Review the following SQL query:
SET Valid = 0 WHERE RenderResult LIKE '%Example text to find here%'
- Determine a unique string of words or characters from the content you wish to refresh, then replace the
Example text to find hereplaceholder in the query with your string.
- Execute the query via the SQL Console or SQL Server Management Studio.
- Clear the server cache.
If the content is still not updated, perhaps your example text did not target the correct module. You should try again with different terms.
There are other more drastic queries which you can execute, such as the above query without the WHERE clause or even truncating the whole table. Attempt this if you are proficient with SQL and have double-checked step 1 above, the database backup.
Another possible workaround would be to create a new content item and replace the existing one on the page. This has the downside of losing any module metadata or revision history but can rule out edge case scenarios which are not resolved by any of the above actions.
If your site frequently encounters LC cache items that won't refresh as expected, it may be worth looking into a version upgrade especially if you are on 9.2 or older.
To test that this has been resolved:
- Create a test page (not visible to the public).
- Go to Edit Mode > Click Add Module.
- Add a content visualizer for the same content type.
- Test if the content is loading correctly on this page.
If the result page displayed is the parent page, then the issue could be related to AUM instead of Liquid Content. The way that AUM handles non-existing child pages is by displaying the content of the parent page. Changing the URL of the affected page may solve the issue.