Skip to content

Order endpoint caching (depends on #54)#89

Draft
alastairong1 wants to merge 1 commit intomainfrom
alastair/order-endpoint-caching
Draft

Order endpoint caching (depends on #54)#89
alastairong1 wants to merge 1 commit intomainfrom
alastair/order-endpoint-caching

Conversation

@alastairong1
Copy link
Copy Markdown
Contributor

Summary

  • Wraps get_orders_by_address and get_orders_by_token handlers with AppCache lookups (15s TTL, 1000 capacity)
  • Adds OrdersByOwnerCache and OrdersByTokenCache types with constructors
  • Adds Copy, PartialEq, Eq, Hash derives to OrderSide for use as cache key
  • Adds From<Arc<ApiError>> impl for cache error conversion
  • Registers caches as Rocket managed state

Dependencies

Test plan

  • Second request to same endpoint within 15s returns in <100ms
  • Different page/page_size params get separate cache entries
  • Cache expires after 15s TTL

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 40630dcd-9c88-466e-afe5-42689a9e99ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alastair/order-endpoint-caching

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant