Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl ETag to /me #2462

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

impl ETag to /me #2462

wants to merge 2 commits into from

Conversation

ramdos0207
Copy link
Contributor

resolves #1055
キャッシュされないエンドポイントの中で最も平均のレスポンスボディが長さが長いエンドポイントである/meにETagを追加しました。これにより、リロード時の転送量の30%程度が削減できます。

https://q.trap.jp/messages/4c4ceb48-9c54-4cba-b6f4-c70224b6bfac

Copy link

@cp-20 cp-20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

動く実装ではあると思うんだけど、もっと良い書き方ができる気がします...!

router/v3/responses.go Outdated Show resolved Hide resolved
router/v3/users.go Outdated Show resolved Hide resolved
@ramdos0207 ramdos0207 requested a review from cp-20 October 27, 2024 02:09
Copy link

@cp-20 cp-20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

実装としては良さそうに見えます👍

ただ実際のところ lastOnline みたいなのがあるとキャッシュヒット率はそんなに高くなさそうというのがあり、キャッシュヒット率の測定をしてキャッシュの有効性を判定するというのもできるといいのかなと思いました (このPRでやる必要はない)

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.

/users/meでETagをつける
2 participants