Skip to content

Add image caching #1

@5Avian

Description

@5Avian

The entire reason for making this application server-side was to make it possible to embed the generated image directly into mod descriptions without having to download & upload the image. Currently every request causes a Modrinth API call, a Modrinth CDN download and the creation of a new image. By adding caching, we can reduce API calls and image operations.

The following things could be cached:

  • Project JSON objects (only necessary values) (updates after x amount of time)
  • Mod icons (updates when the icon url in the project changes)
  • Generated badge images (updates when the icon changes)

Besides these conditions, the cache should also be limited to a configurable amount of bytes. This would mean the least used images/icons should be dropped from the cache when it's full.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions