feat: добавить Image Gateway с кешем Souin

- добавлена сборка Caddy с Souin, Otter и NutsDB

- добавлена конфигурация dev, prod и test Docker Compose

- настроено кеширование через Otter L1 и NutsDB L2

- добавлены e2e-тесты Bun для кеша, restart и purge

- добавлена документация по запуску, API кеша и тестам
This commit is contained in:
2026-05-04 12:18:37 +03:00
commit 0751c4b469
26 changed files with 1608 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import { describe, expect, test } from "bun:test";
import { expectHit, requestImage, waitForReady } from "./helpers.js";
describe("cache persistence", () => {
test("serves cached response from NutsDB after Caddy restart", async () => {
await waitForReady();
const hit = await requestImage(103);
expect(hit.status).toBe(200);
expectHit(hit.cacheStatus, "NUTS");
});
});