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: apps/docs/docs/cache.mdx
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The **Expo Open OTA server** uses a cache to improve performance and reduce serv
12
12
The cache is primarily used for:
13
13
14
14
1.**Storing the computed `lastUpdateId` for a given platform and runtime version**
15
+
15
16
- This prevents the need to recompute the last update for every request, significantly speeding up responses.
16
17
17
18
2.**Caching the computed manifest**
@@ -22,19 +23,20 @@ The cache is primarily used for:
22
23
The environment variables required for each storage solution are listed below, you can set them in a `.env` file in the root of the project or keep them in a safe place to prepare for deployment.
23
24
:::
24
25
25
-
importTabsfrom'@theme/Tabs';
26
-
importTabItemfrom'@theme/TabItem';
26
+
importTabsfrom"@theme/Tabs";
27
+
importTabItemfrom"@theme/TabItem";
27
28
28
29
<TabsqueryString="cache"defaultValue="local">
29
30
<TabItemvalue="local"label="Local cache"default>
30
31
:::warning
31
32
32
-
This cache solution is not recommended for production use. It is intended for development and testing purposes only.
33
-
If you really want to use it in production, make sure to not have multiple instances of the server running, as the cache is stored locally and not shared between instances.
33
+
This cache solution is not recommended for production use. It is intended for development and testing purposes only.
34
+
If you really want to use it in production, make sure to not have multiple instances of the server running, as the cache is stored locally and not shared between instances.
35
+
36
+
:::
37
+
Local cache is the default cache solution used by the server. It stores the cache in memory and is not shared between instances of the server. This means that the cache is lost when the server is restarted.
38
+
No additional configuration is required to use the local cache.
34
39
35
-
:::
36
-
Local cache is the default cache solution used by the server. It stores the cache in memory and is not shared between instances of the server. This means that the cache is lost when the server is restarted.
37
-
No additional configuration is required to use the local cache.
38
40
</TabItem>
39
41
<TabItemvalue="redis"label="Redis">
40
42
To use Redis as your cache solution, you need to set the following environment variables:
@@ -43,6 +45,26 @@ import TabItem from '@theme/TabItem';
43
45
REDIS_PORT=your-redis-port
44
46
REDIS_PASSWORD=your-redis-password
45
47
REDIS_USE_TLS=true // optional if you are using a TLS connection
48
+
REDIS_USERNAME=your-redis-username // optional for ACL authentication
49
+
REDIS_CA_CERT_B64=base64-encoded-ca-certificate // optional for TLS with custom CA
46
50
```
51
+
52
+
:::tip TLS/SSL Configuration
53
+
54
+
If you're using Redis with TLS/SSL and a custom CA certificate:
55
+
- Set `REDIS_USE_TLS=true`
56
+
- Set `REDIS_CA_CERT_B64` to your base64-encoded PEM certificate
57
+
- To encode your certificate: `cat certificate.pem | base64 -w 0`
58
+
59
+
:::
60
+
61
+
:::info ACL Authentication
62
+
63
+
If your Redis server uses ACL (Access Control Lists):
64
+
- Set `REDIS_USERNAME` to your Redis username
65
+
- Ensure `REDIS_PASSWORD` is set to the corresponding password
0 commit comments