@@ -134,6 +134,38 @@ remove all versions.
134
134
./code-marketplace remove ms-python.python --all [flags]
135
135
```
136
136
137
+ ## Scanning frequency and caching
138
+
139
+ The marketplace does not utilize a database. When an extension query is made,
140
+ the marketplace scans the local file system or queries Artifactory on demand to
141
+ find all the available extensions.
142
+
143
+ However, for Artifactory in particular this can be slow, so this full list of
144
+ extensions is cached in memory for a default of one minute and reused for any
145
+ subsequent requests that fall within that duration. This duration can be
146
+ configured or disabled with ` --list-cache-duration ` and applies to both storage
147
+ backends.
148
+
149
+ This means that when you add or remove an extension, depending on when the last
150
+ request was made, it can take a duration between zero and
151
+ ` --list-cache-duration ` for the query response to reflect that change.
152
+
153
+ Artifactory storage also uses a second in-memory cache for extension manifests,
154
+ which are referenced in extension queries (for things like categories). This
155
+ cache is initially populated with all available extension manifests on startup.
156
+ Extensions added after the server is running are added to the cache on-demand
157
+ the next time extensions are scanned.
158
+
159
+ The manifest cache has no expiration and never evicts manifests because it was
160
+ expected that extensions are typically only ever added and individual extension
161
+ version manifests never change; however we would like to implement evicting
162
+ manifests of extensions that have been removed.
163
+
164
+ With local storage, manifests are read directly from the file system on
165
+ demand. Requests for other extension assets (such as icons) for both storage
166
+ backends have no cache and are read/proxied directly from the file system or
167
+ Artifactory since they are not in the extension query hot path.
168
+
137
169
## Usage in code-server
138
170
139
171
You can point code-server to your marketplace by setting the
@@ -171,7 +203,7 @@ Although not officially supported, you can follow the examples below to start us
171
203
export VSCODE_GALLERY_ITEM_URL="https://<domain>/item"
172
204
# Or set a product.json file in `~/.config/VSCodium/product.json`
173
205
codium
174
- ```
206
+ ```
175
207
176
208
## Missing features
177
209
0 commit comments