Problems with Rebuilding Umbraco Database Cache

When you call a Database Cache to rebuild in the Umbraco v13 back office, you may have trouble tracking when the operation has finished

But let's start from the beginning:

Steps to Rebuild the Database Cache in Umbraco#

1. Log in to the Umbraco Back Office:

  • Access the Umbraco back office via your website (e.g., https://yourwebsite.com/umbraco).
  • Use your administrator credentials to log in.

2. Navigate to the "Settings" Section:

  • On the top menu, click on Settings.

3. Open the "Published Status" Tab:

  • Within the Settings section, locate and click on the Published Status tab.

4. Locate the "Caches" Section:

  • On the Published Status view, scroll to the section labeled Caches.
  • You will see different cache types, such as Database Cache, Memory Cache, etc.

5. Select "Database Cache":

  • Find the Database Cache option within the Caches section.
Umbraco v13 Rebuild Database Cache option in Back office

Umbraco v13 Rebuild Database Cache option in Back office

Database Cache
This button lets you rebuild the database cache, ie the content of the cmsContentNu table. Rebuilding can be expensive. Use it when reloading is not enough, and you think that the database cache has not been properly generated - which would indicate some critical Umbraco issue.

6. Click on "Rebuild"🚧:

  • Next to the Database Cache entry, click the Rebuild button.
  • A confirmation dialog will appear with the message:

    "Rebuild content in cmsContentNu database table. Expensive."

  • Click OK to confirm and start the rebuild process.
  • This triggers the rebuild process for the cmsContentNu table.
Umbraco confirmation modal: Rebuild content in cmsContentNu database table. Expensive.

Umbraco confirmation modal: Rebuild content in cmsContentNu database table. Expensive.

Umbraco Rebuild Database Cache Progress Bar

7. Wait for the Rebuild to Complete:

⚠️No Visual Feedback in UI:

Umbraco will process the rebuild operation, but the back office does not provide visual confirmation of its completion, especially for large datasets.

The screen may appear to hang, particularly with large tables (e.g., 600,000 records in cmsContentNu), and there is no relevant progress bar or completion message in the interface.

You may also see the following modal window of death😊:

Umbraco Rebuild Database Cache UI error
Umbraco Database cache funny meme

It's worth checking out the database.

If you go to the cmsContentNu table, you may see similar metrics:

Overview of cmsContentNu table in Umbraco

Overview of cmsContentNu table in Umbraco

You will see many records in the cmsContentNu table if your project is large.

Because Content, Media, and Member data are stored there.

This explains why the whole process of rebuilding the Database Cache takes a long time.

💡Note: If you want to see how the process exactly works - just navigate directly to the NuCacheContentRepository.cs

⚠️No Logs:

Umbraco does not log this operation in logs, so you cannot rely on the log files to confirm that the process has been completed.

⚠️Difficulty Verifying Updates

Since the cmsContentNu table does not include a timestamp for records, it’s challenging to determine whether data was updated during the rebuild.

You might need to compare the content serialized in the data column, but that's time-consuming.

8. Verify the Rebuild:

✅Solution:

Query the table [umbracoKeyValue], which stores metadata about the NuCache Serializer, including the timestamp of the last successful rebuild.

Run the following query:

SELECT [key]
      ,[value]
      ,[updated] -- This column contains the timestamp of the operation's completion
FROM [dbo].[umbracoKeyValue]
WHERE [key] = 'Umbraco.Web.PublishedCache.NuCache.Serializer';

The updated column in this table provides the exact date and time when the cache rebuild was completed.

Umbraco Database Cache Rebuild timestamp

Umbraco Database Cache Rebuild timestamp

Interpret the Result:

Compare the updated timestamp with the time when you triggered the rebuild to confirm the operation's completion.

Note: With a 320K content nodes dataset, the operation usually takes up to 1,5 hours (depending on CPU resources).

Conclusion#

Umbraco V13 lacks proper logging for this critical rebuilding of the database cache.

Specifically:

  • No logs indicate when the operation starts, progresses, or completes.
  • The UI provides no visual feedback to confirm success, especially for large datasets.

This omission makes monitoring and diagnosing issues related to cache updates difficult.

Adding logs for cache rebuild operations and improving UI feedback would significantly enhance the usability and reliability of this feature.

↑ Top ↑