Skip to content

Commit

Permalink
feat(docs): document that there is a cache now #137
Browse files Browse the repository at this point in the history
  • Loading branch information
fengelniederhammer committed Mar 4, 2024
1 parent 17ff89c commit 88906a4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lapis2-docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ export default defineConfig({
},
],
},
{
label: 'Concepts',
items: [
{
label: 'Caching',
link: '/maintainer-docs/concepts/caching',
},
],
},
{
label: 'Tutorials',
items: [
Expand Down
7 changes: 7 additions & 0 deletions lapis2-docs/src/components/CacheSizeEndpointLink.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
import { getLapisUrl } from '../lapisUrl';
const link = getLapisUrl() + '/actuator/metrics/cache.size';
---

<a href={link} target='_blank'>{link}</a>
17 changes: 17 additions & 0 deletions lapis2-docs/src/content/docs/maintainer-docs/concepts/caching.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Caching
description: LAPIS' caching concept
---

import CacheSizeEndpointLink from '../../../../components/CacheSizeEndpointLink.astro';

LAPIS uses Spring Boot's caching capabilities to cache insertion and mutation queries.
We decided to cache SILO actions that are relatively expensive to compute,
but don't return much data (measured in size of the response body).

At the time of writing, we think that aggregated queries are fast enough to not require caching.
Details and FASTA actions are more expensive, but return potentially large amounts of data.

LAPIS offers an endpoint to check the current cache size (in number of cached entries) at `/actuator/metrics/cache.size`:

<CacheSizeEndpointLink />
1 change: 1 addition & 0 deletions lapis2-docs/tests/docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ const maintainerDocsPages = prependToRelativeUrl(
],
'/references',
),
...prependToRelativeUrl([{ title: 'Caching', relativeUrl: '/caching' }], '/concepts'),
...prependToRelativeUrl(
[
{ title: 'Start LAPIS and SILO', relativeUrl: '/start-lapis-and-silo' },
Expand Down

0 comments on commit 88906a4

Please sign in to comment.