Conditional GETs
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start by tracing plumber2's GET/HEAD route handling and the existing ETag tag creation functionality mentioned in issue #75. Review the conditional-request reference, then define how the proposed @etag value would be generated and compared. Done means matching GET/HEAD requests return 304 without a response body, while initial 200 responses include the generated ETag.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
It would be neat if plumber2 supported conditional GETs out of the box. I suspect I could use the tag creation functionality to do it myself, but it would be a nice to have for improving server-side rendered HTML applications.
Using an etag, plumber2 could automatic respond with a 304 Not Modified and short-circuit the response if the client's If-None-Match matches the server. This would speed up server responses and reduce repetitive computations. Perhaps the etag generation mechanism could be specified by a roxygen tag too.
Eg
#' @get /
#' @etag Sys.Date()
function() {
my_html()
}
In this example, on a 200 OK, the server would return the normal response body as well as etag generated via Sys.Date(). Subsequent gets from the same client would return a 304 to the client if the client's etag date matches the server's (via string equality).
Scope: only applies to GET/HEAD routes, & no response body is sent
References
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Conditional_requests
- https://api.rubyonrails.org/classes/ActionController/ConditionalGet.html
As an aside (and probably out of scope for this issue), being able to have a @cache tag to automatically cache responses would be nice. We can do this manually atm via eg memoise and client id, but it would make these patterns more discoverable and feel more "batteries included" particularly for SSR purposes
- Ngôn ngữ chính
- R
- Star
- 119
- Fork
- 17
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của posit-dev/plumber2
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
`except` argument in `Plumber2$add_shiny` method is not respectedCó thể đã có người làm @cgiachalis đã nhận 139 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Update vignette `hosting.qmd`Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Development RoadmapĐang mở
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 20/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Tất cả issue của posit-dev/plumber2
Issue tương tự
-
num_ode_rk4_adaptive rejects atol = 0 while accepting rtol = 0 and while num_ode_dopri5 accepts bothĐang mởarea/ode-pde good first issue help wanted kind/contract severity/4-minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Apich-Organization/rssn#383 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PRL-PRG/r-compile-server#70 · 1 bình luận ·
-
dependencies docker enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
posit-dev/images-workbench#257 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies docker enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
posit-dev/images-package-manager#188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies docker enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
posit-dev/images-connect#222 ·
Maintainer thường phản hồi trong vòng 1 ngày