From 5fe0c2ce7879b961bd1fe2209f4603b2c8b23b87 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Sat, 3 Jul 2021 20:07:13 +0200 Subject: [PATCH] Wire up example backend to use in-memory cache. Signed-off-by: Eric Peterson --- app-config.yaml | 3 ++- packages/backend/src/plugins/techdocs.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app-config.yaml b/app-config.yaml index 913a72dbab..881e97aa5f 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -112,7 +112,8 @@ techdocs: # pullImage: true # or false to disable automatic pulling of image (e.g. if custom docker login is required) publisher: type: 'local' # Alternatives - 'googleGcs' or 'awsS3' or 'azureBlobStorage' or 'openStackSwift'. Read documentation for using alternatives. - + cache: + ttl: 60000 # 1 minute cache for demonstration purposes. You may wish to set this higher in production. sentry: organization: my-company diff --git a/packages/backend/src/plugins/techdocs.ts b/packages/backend/src/plugins/techdocs.ts index eb1e0502db..c32bbccbb0 100644 --- a/packages/backend/src/plugins/techdocs.ts +++ b/packages/backend/src/plugins/techdocs.ts @@ -29,6 +29,7 @@ export default async function createPlugin({ config, discovery, reader, + cache, }: PluginEnvironment): Promise { // Preparers are responsible for fetching source files for documentation. const preparers = await Preparers.fromConfig(config, { @@ -64,5 +65,6 @@ export default async function createPlugin({ logger, config, discovery, + cache, }); }