indexer icon indicating copy to clipboard operation
indexer copied to clipboard

feat: add memory cache for swagger endpoints

Open lewinskimaciej opened this issue 2 years ago • 0 comments

Adds basic in memory cache for swagger.json(from HapiSwagger) and /admin/open-api endpoints.

Swagger generation can take up to 20 seconds from my experience which is a lot, often causing timeouts in code generating libraries like Orval. This just caches them in memory using the default Hapi memory implementation. Especially annoying if you often use Swagger UI to test requests or do stuff.

Chosen a week since it will re-generate after each restart anyway, can change to whatever you find suitable.

lewinskimaciej avatar Jan 31 '24 09:01 lewinskimaciej