aboutsummaryrefslogtreecommitdiffhomepage
path: root/pingora-cache
AgeCommit message (Collapse)Author
2024-10-18Guard against excess cache put response body payloadsEdward Wang
Previously clients to the cache put interface writing excess response body payloads (or bodies for responses that shouldn't have bodies) could trigger a panic in the body parser. This change opts to just drain these excess payloads without writing the excess body into cache.
2024-10-12Refactor openssl code one more time before rustls integrationYuchen Wu
Co-authored-by: Harald Gutmann <[email protected]>
2024-10-11Merge extensions between old and new meta on revalidateEdward Wang
2024-10-11Add a warning log if the dictionary for `HeaderSerde` is `None`Kevin Guthrie
2024-10-11Rust 1.81Yuchen Wu
2024-10-07A couple of error message nitsGustav Davidsson
2024-09-13Allow miss handler to lookup storage using streaming write tagEdward Wang
When supporting streaming partial writes, the cache miss request may not always find the corresponding body reader for the storage asset that its upstream write is trying to fill. This change adds a lookup_streaming_write storage API and allows the miss handler to provide a streaming write tag for use with the API, so that it may find the matching hit handler to serve downstream.
2024-09-06change lock status memory ordering, tag spansMatthew Gumport
This changes the memory ordering for the lock status load to `SeqCst` from `Relaxed` to eliminate a potential source of panics. Panics had the frames: ``` pingora_proxy::proxy_cache::<T>::handle_lock_status (proxy_cache.rs:748) pingora_proxy::proxy_cache::<T>::proxy_cache::{{closure}} (proxy_cache.rs:211) pingora_proxy::HttpProxy<T>::process_request::{{closure}} (lib.rs:509) pingora_proxy::HttpProxy<T>::process_new_http::{{closure}} (lib.rs:727) ``` which showed we were checking on the status of the lock, after waiting on it, and still seeing its status as waiting. The status is returned by value, so this is not a time-of-check to time-of-use problem, this is an inconsistency in how the lock status is managed. The change in memory order is mostly for the sake of this programmer's attempts to understand what is happening. This also completes a couple of TODOs to limit the wait period as well as tag the span with the lock status.
2024-09-06unset meta on cache missMatthew Gumport
If we have a cache miss, any meta in this object is invalid. Unset it so that we don't use it later.
2024-08-09Derive `Ord` and `PartialOrd` for `CompactCacheKey`Kevin Guthrie
2024-08-09Set stale-updating as an explicit CachePhaseEdward Wang
This cache phase indicates when we are serving a stale cache hit, but there is another request currently updating the asset.
2024-08-09Allow Stale phase in cache_missEdward Wang
There could be a race condition where a Stale request waiting on cache lock retries the cache lock and lookup, but enters cache_miss after finding the asset is no longer present.
2024-07-26Address Rust 1.80 clippy warnings.Yuchen Wu
Also remove the doc_async_trait cfg since it is no longer viable.
2024-07-12Release 0.3.00.3.0Yuchen Wu
2024-06-28Report evction/invalidtion typesYuchen Wu
This helps the storage to log/track different type of cache deletions.
2024-06-07update CacheKey to allow overriding primary key hashZaidoon Abd Al Hadi
2024-05-24Allow the lookup_duration to be readYuchen Wu
2024-05-24Track cache lookup timeYuchen Wu
2024-05-10Release 0.2.00.2.0Yuchen Wu
2024-04-22address string interpolation outside of proper contextMatthew Gumport
https://github.com/cloudflare/pingora/issues/181 Ran: ``` rg --pcre2 '(?<!(trace\!\()|(println\!\()|(warn\!\()|(info\!\()|(debug\!\()|(format\!\()|(error\!\()|(write\!\()|(panic\!\())\".*\{.+\"' ``` and audited the 200+ results by hand. Only messed up in a few places! Hat-tip to Kevin for helping me understand the compile error messages I was seeing trying to fix this naively.
2024-04-05Add/polish some commentsGustav Davidsson
2024-04-05Clarify cache-control regex commentsewang
Also update a few comment links for the newest HTTP RFCs.
2024-04-05Fix typos and grammar issues in docsYuchen Wu
And other things. Co-authored-by: DimanNe <[email protected]> Co-authored-by: Xiaobo Liu <[email protected]> Co-authored-by: houseme <[email protected]> Co-authored-by: lilo <[email protected]> Co-authored-by: Yang He <[email protected]>
2024-04-05Only compile pingora-openssl when openssl feature is enabled.afon
Replicated-from: https://github.com/cloudflare/pingora/pull/131 Includes-commit: ae706cdf49324f6f871b2bfd712f01f07b1dfed0
2024-04-05tests(cache): add tests for purge methodpluveto
Replicated-from: https://github.com/cloudflare/pingora/pull/18 Includes-commit: e5a3865e9dd5a381491b0e2ee8d2661f4fb59ffd Includes-commit: f4af9ad3a50f6ce37f1e936460357f9c2cd3d247 Includes-commit: bbfb1eb5ba7194791b1128c83f5d4d8e5719e4f2 Includes-commit: f74cf9f82aac6f9fb47962d0dcdc69add831cf2b
2024-03-15fix some commentsbattmdpkq
Signed-off-by: battmdpkq <[email protected]> Replicated-from: https://github.com/cloudflare/pingora/pull/123 Includes-commit: 943bedb2811dc9a2b9b31c2f3576aa7cd2cb8f90
2024-03-15compile and test cleanly with nightlyMatthew Gumport
The vast majority of these are redundant imports.
2024-03-01Fix typos and grammar issuesYuchen Wu
Co-authored-by: =?~~~?q?Ren=C3=A9=20Kla=C4=8Dan?= <[email protected]> Co-authored-by: 12932 <[email protected]> Co-authored-by: Alessandro <[email protected]> Co-authored-by: InImpasse <[email protected]> Co-authored-by: Paul James Cleary <[email protected]> Co-authored-by: Yang Hau <[email protected]> Co-authored-by: Morpheus <[email protected]> Co-authored-by: mobeicanyue <[email protected]> Co-authored-by: Twacqwq <[email protected]> Co-authored-by: Bobby <[email protected]> Co-authored-by: Dup4 <[email protected]> Co-authored-by: Josh Soref <[email protected]> Co-authored-by: Sheldon <[email protected]> Co-authored-by: houseme <[email protected]> Co-authored-by: ZhangIvan1 <[email protected]> Co-authored-by: GrahamQuan <[email protected]> Co-authored-by: =?~~~?q?Cristian=20Paul=20Pe=C3=B1aranda=20Rojas?= <[email protected]> Co-authored-by: Nathan Sit <[email protected]> Co-authored-by: David Lee <[email protected]> Co-authored-by: Mengliang Su <[email protected]> Co-authored-by: =?~~~?q?=EA=B9=80=EC=84=A0=EC=9A=B0?= <[email protected]> Co-authored-by: Allen Huang <[email protected]> Co-authored-by: Opacity <[email protected]> Co-authored-by: cris <[email protected]> Co-authored-by: Killian Ye <[email protected]> Co-authored-by: Jiwei-dev <[email protected]> Co-authored-by: Jinfeng Wang <[email protected]> Co-authored-by: Ikko Eltociear Ashimine <[email protected]>
2024-02-27Release Pingora version 0.1.0v0.1.0Yuchen Wu
Co-authored-by: Andrew Hauck <[email protected]> Co-authored-by: Edward Wang <[email protected]>