From b42ccdee63fc568314b65befddc3135fe77f681b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 30 Nov 2022 16:42:38 +0300 Subject: [PATCH] Initial Configuring Production document --- docs/en/Deployment/Configuring-Production.md | 23 ++++++++++++++++++++ docs/en/Deployment/Index.md | 1 + docs/en/docs-nav.json | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 docs/en/Deployment/Configuring-Production.md diff --git a/docs/en/Deployment/Configuring-Production.md b/docs/en/Deployment/Configuring-Production.md new file mode 100644 index 0000000000..b9b9253ca7 --- /dev/null +++ b/docs/en/Deployment/Configuring-Production.md @@ -0,0 +1,23 @@ +# Configuring for Production + +ABP Framework has a lot of options to configure and fine-tune its features. They are all explained their own documents. Default values for these options are pretty well for most of the deployment environments. However, you may need to care about some options based on how you've structured your deployment environment. In this document, we will highlight these kind of options. So, it is highly recommended to read this document to not have unexpected behaviors in your system in production. + +## 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. + +````csharp +Configure(options => +{ + options.KeyPrefix = "MyCrmApp"; +}); +```` + +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 #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. + diff --git a/docs/en/Deployment/Index.md b/docs/en/Deployment/Index.md index 6503f8b664..852efa3d43 100644 --- a/docs/en/Deployment/Index.md +++ b/docs/en/Deployment/Index.md @@ -6,4 +6,5 @@ However, there are some topics that you should care about when you are deploying ## Guides +* [Configuring for production](Configuring-Production.md): Notes for some important configurations for production environments. * [Deploying to a clustered environment](Clustered-Environment.md): Explains how to configure your application when you want to run multiple instances of your application concurrently. diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index ef6b0cad07..d7cf2a5389 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -1299,6 +1299,10 @@ "text": "Deployment", "path": "Deployment/Index.md", "items": [ + { + "text": "Configuring for Production", + "path": "Deployment/Configuring-Production.md" + }, { "text": "Deploying to a Clustered Environment", "path": "Deployment/Clustered-Environment.md"