From c5fac16161337abc27e221f8000fe4f5e2466cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 30 Nov 2022 16:49:40 +0300 Subject: [PATCH] Added section: Distributed Lock Prefix --- docs/en/Deployment/Configuring-Production.md | 23 +++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/en/Deployment/Configuring-Production.md b/docs/en/Deployment/Configuring-Production.md index b9b9253ca7..160885c5d0 100644 --- a/docs/en/Deployment/Configuring-Production.md +++ b/docs/en/Deployment/Configuring-Production.md @@ -4,7 +4,7 @@ ABP Framework has a lot of options to configure and fine-tune its features. They ## Distributed Cache Prefix -ABP's [distributed cache infrastructure](../Caching.md) provides an option to set a key prefix for all of your data saved into your distributed cache provider. The default value of this option is not set (it is `null`). If you are using a distributed cache server that is concurrently used by different applications, then you can set a prefix value to isolate an application's cache data from others. +ABP's [distributed cache infrastructure](../Caching.md) provides an option to set a key prefix for all of your data saved into your distributed cache provider. The default value of this option is not set (it is `null`). If you are using a distributed cache server that shared by different applications, then you can set a prefix value to isolate an application's cache data from others. ````csharp Configure(options => @@ -13,11 +13,28 @@ Configure(options => }); ```` -That's all. ABP, then will add this prefix to all of your cache keys in your application as along as you use ABP's `IDistributedCache` or `IDistributedCache` services. See the [caching documentation](../Caching.md) if you are new to the distributed caching. +That's all. ABP, then will add this prefix to all of your cache keys in your application as along as you use ABP's `IDistributedCache` or `IDistributedCache` services. See the [Caching documentation](../Caching.md) if you are new to the distributed caching. > **Warning #1**: If you use ASP.NET Core's standard `IDistributedCache` service, it's your responsibility to add the key prefix (you can get the value by injecting `IOptions`). ABP can not do it. -> **Warning #2**: Even if you never used distributed caching in your own codebase, ABP still uses it for some systems. So, you should always configure this prefix if your server is shared among multiple systems. +> **Warning #2**: Even if you have never used distributed caching in your own codebase, ABP still uses it for some features. So, you should always configure this prefix if your caching server is shared among multiple systems. > **Warning #3**: Some of the ABP's startup templates are pre-configured to set a prefix value for the distributed cache. So, please check your application code if it is already configured. +## Distributed Lock Prefix + +ABP's [distributed locking infrastructure](../Distributed-Locking.md) provides an option to set a prefix for all keys you are using in the distributed lock server. The default value of this option is not set (it is `null`). If you are using a distributed lock server that is shared by different applications, then you can set a prefix value to isolate an application's locks from others. + +````csharp +Configure(options => +{ + options.KeyPrefix = "MyCrmApp"; +}); +```` + +That's all. ABP, then will add this prefix to all of your keys in your application. See the [Distributed Locking documentation](../Distributed-Locking.md) if you are new to the distributed locking. + +> **Warning #1**: Even if you have never used distributed locking in your own codebase, ABP still uses it for some features. So, you should always configure this prefix if your distributed lock server is shared among multiple systems. + +> **Warning #2**: Some of the ABP's startup templates are pre-configured to set a prefix value for the distributed locking. So, please check your application code if it is already configured. +