Skip to content

Commit

Permalink
due to current design, minimum value for TenantDataCacheLifetimeInMin…
Browse files Browse the repository at this point in the history
…utes is 1 (not 0)
  • Loading branch information
Yvand committed Apr 19, 2024
1 parent edb34a5 commit 33ebd9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Yvand.EntraCP/TEMPLATE/ADMIN/EntraCP/GlobalSettings.ascx
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
<br />
<wssawc:EncodedLiteral runat="server" Text="For performance reasons, the members of those groups are stored in a local cache." EncodeMethod='NoEncode' />
<br />
<span>You can customize its lifetime (default value is <%= DefaultTenantDataCacheLifetimeInMinutes %> minutes), or type 0 to deactivate it (not recommended).</span>
<span>You can customize its lifetime (default value is <%= DefaultTenantDataCacheLifetimeInMinutes %> minutes), and the minimum possible value is 1 minute.</span>
</Template_Description>
<Template_InputFormControls>
<label for="<%= InputRestrictSearchableUsersByGroups.ClientID %>" title="Example: 1D6C19BB-DA3B-48D7-98FF-066CB9CA3F14,755D28C4-A2D8-4ACB-ADCE-68D4C6570938">List of groups ID separated by a comma &#9432;:</label><br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,9 @@ public virtual void ValidateConfiguration()
}
}

if (this.TenantDataCacheLifetimeInMinutes < 0)
if (this.TenantDataCacheLifetimeInMinutes < 1)
{
throw new InvalidOperationException($"The configuration is invalid because property {nameof(TenantDataCacheLifetimeInMinutes)} has a negative value.");
throw new InvalidOperationException($"The configuration is invalid because property {nameof(TenantDataCacheLifetimeInMinutes)} is set to 0 or a negative value. Minimum value is 1");
}

if (this.RestrictSearchableUsersByGroups != null)
Expand Down

0 comments on commit 33ebd9f

Please sign in to comment.