0

I'm trying to programmatically update the WIF thumbprint value in Kentico. I've developed a small app that does the following:

Get's the value
string thumprintValue = SettingsKeyInfoProvider.GetValue("CMSWIFTrustedCertificateThumbprint");

Set's the new value
SettingsKeyInfoProvider.SetGlobalValue("CMSWIFTrustedCertificateThumbprint", newThumbprintValue);

I can see the value being updated in the database. The app returns the new value as well.

The problem is that when I login to Kentico CMS (I'm using Kentico 9.0.42 BTW) and check the value in the portal, it still shows the old value.

I checked that the app and the Kentico CMS app are both connecting to the same database. What else could it be?

Thanks!

Clyde D'Souza
  • 402
  • 2
  • 10

1 Answers1

4

It's most likely a cached value you're seeing in the database. Clear the cache in the System app and try viewing the settings again.

Brenden Kehren
  • 5,919
  • 16
  • 27
  • Thanks and apologies for the delayed response. Manually clearing the system cache worked. Additionally, I tried using `CacheHelper.ClearCache();` after setting the value hoping I can programmatically clear cache rather than from the UI but this didn't work. Do you know why? – Clyde D'Souza Aug 31 '20 at 04:00
  • This also works if you've updated the settings via SQL – rory Apr 27 '21 at 09:05