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

redisの導入 #184

Open
fuji8 opened this issue Jun 19, 2021 · 1 comment · Fixed by #185
Open

redisの導入 #184

fuji8 opened this issue Jun 19, 2021 · 1 comment · Fixed by #185
Labels
enhancement New feature or request priority:LOW

Comments

@fuji8
Copy link
Contributor

fuji8 commented Jun 19, 2021

  • go-cache をなくす
  • traQのレスポンスをキャッシュして、速度向上と負担軽減
@fuji8 fuji8 added the enhancement New feature or request label Jun 19, 2021
@fuji8 fuji8 mentioned this issue Jun 27, 2021
@fuji8
Copy link
Contributor Author

fuji8 commented Jun 28, 2021

背景

domainにとってはinfraの性質に左右されないことを前提にコードを書いていたが、web APIが遅く、全体のレスポンスも目に見えるほど時間がかかるようになっていた。
遅い原因は、同じデータに1リクエストで複数回アクセスされうるような構造になっていたから。(middlewareによる)
上記の原因に対処はリクエストごとのキャッシュだが、リクエストにキャッシュを結び付けるのが面倒(層が異なる。リクエストはrouter、キャッシュはinfra)なためinfraに近いusecaseでキャッシュをする。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority:LOW
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant