feat: Add durable object for Anilist requests (#2)

This commit introduces a durable object to handle Anilist GraphQL requests, with the goal of preventing request duplication.

The durable object is designed to cache responses from the Anilist API, with a TTL based on the `nextAiringEpisode` field in the response.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
2025-11-14 13:07:36 +08:00
committed by GitHub
parent f6a3ea2649
commit 959265484c
6 changed files with 1258 additions and 133 deletions

View File

@@ -10,3 +10,11 @@ ENABLE_ANIFY = false
[observability]
enabled = true
[[durable_objects.bindings]]
name = "ANILIST_DO"
class_name = "AnilistDo"
[[migrations]]
tag = "v1"
new_classes = ["AnilistDo"]