You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Boilerplate.Server.AppHost.csproj
Copy file name to clipboardExpand all lines: src/Templates/Boilerplate/Bit.Boilerplate/src/Server/Boilerplate.Server.AppHost/Infrastructure/Extensions/IDistributedApplicationBuilderExtensions.cs
+22-2Lines changed: 22 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,9 @@
2
2
usingAspire.Hosting.Maui;
3
3
usingAspire.Hosting.Azure;
4
4
usingAspire.Hosting.DevTunnels;
5
+
//#if (redis == true)
5
6
usingAzure.Provisioning.RedisEnterprise;
7
+
//#endif
6
8
7
9
namespaceAspire.Hosting;
8
10
@@ -20,7 +22,25 @@ public static IResourceBuilder<AzureManagedRedisResource> AddRedisCache(this IDi
20
22
{
21
23
redis.WithRedisInsight()
22
24
.WithRedisCommander()
23
-
.WithImage("redis/redis-stack","latest");
25
+
.WithImage("redis/redis-stack","latest")
26
+
.WithArgs(
27
+
"--save","",// Backend API has its own L1 in-memory cache, no need to have RDB snapshots for the L2 redis cache in case of failures.
28
+
"--appendonly","no",// Disables AOF persistence as well for the same reason.
29
+
"--maxmemory-policy","allkeys-lru"// Evict least recently used keys when memory limit is reached
0 commit comments