Umbraco upgrade 15.4.4 => 16.3.1 (HybridCache with the same key)

I tried upgrading from Umbraco 15.4.4 to the latest version, 16.3.1. The website starts up successfully the first time after the upgrade, but on subsequent attempts, I get the following error:

InvalidOperationException: All calls to HybridCache with the same key should use the same data type; the same key is being used for 'Umbraco.Cms.Infrastructure.HybridCache.ContentCacheNode' and 'Umbraco.Cms.Infrastructure.HybridCache.ContentCacheNode' data


Initially, I thought the issue was caused by some custom services, but I tested the Umbraco upgrade using the same database on a clean Umbraco project (the default Umbraco template) with no additional packages.

The result is the same — it upgrades successfully the first time I start it, but on subsequent startups, the website gets stuck with the same error mentioned above.

I’ve come across that previously, I remember having to do something with rebuilding.

Have you tried deleting the cache folder and then just building?

Looks like this issue

And due for 17.0 and 16.3.2

1 Like