client-query-cache 0.11.0__tar.gz → 0.12.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/PKG-INFO +2 -2
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/README.md +1 -1
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/Cargo.lock +7 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/Cargo.toml +9 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/local_cache/shared.rs +4 -2
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/local_cache.rs +806 -82
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/pyproject.toml +11 -2
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/__init__.py +6 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/contracts.pyi +10 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/entries.py +1 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/identity_reads.py +15 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/locking.py +54 -2
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/lru.py +59 -6
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/manager.py +788 -226
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/namespace.py +12 -8
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/native.py +40 -4
- client_query_cache-0.12.0/src/client_query_cache/_core/retention.py +219 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/snapshots.py +62 -2
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared/adapters.py +2 -1
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared/coordinator.py +2 -2
- {client_query_cache-0.11.0/src/client_query_cache/synchronous → client_query_cache-0.12.0/src/client_query_cache/asynchronous}/__init__.py +6 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/asynchronous/collection.py +35 -17
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/shared.py +1 -1
- {client_query_cache-0.11.0/src/client_query_cache/asynchronous → client_query_cache-0.12.0/src/client_query_cache/synchronous}/__init__.py +6 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/synchronous/collection.py +35 -17
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/LICENSE +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/deny.toml +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/array/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/array.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/clock.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/echo/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/echo.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/frames/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/frames.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/hash/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/hash.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/index/support_tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/index/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/index.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/key_encoder.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/keys.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/lib.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/memory/support_tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/memory/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/memory.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/python.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/relay/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/relay.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/ring/tests.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/ring.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/native/shared-index/src/sync.rs +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/rust-toolchain.toml +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/__init__.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/canonical.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/codec.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/collation.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/collection_metadata.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/count_reads.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/cursor_capture.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/errors.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/find_one_reads.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/find_reads.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/keys.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/lifecycle.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/namespace_metadata.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/order_sensitive_keys.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/projection.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/query_filters.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/read_classification.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/read_validation.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/stream_activation.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/stream_cost.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/stream_events.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/stream_health.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/stream_options.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/stream_startup.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/traversal.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_core/unique_keys.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared/__init__.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared/attachment.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared/shared_index.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared/wire.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_shared_index.pyi +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/_types.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/asynchronous/cursors.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/asynchronous/database.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/asynchronous/manager.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/asynchronous/shared.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/asynchronous/streams.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/otel.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/py.typed +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/synchronous/cursors.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/synchronous/database.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/synchronous/manager.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/synchronous/shared.py +0 -0
- {client_query_cache-0.11.0 → client_query_cache-0.12.0}/src/client_query_cache/synchronous/streams.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: client-query-cache
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Classifier: Framework :: AsyncIO
|
|
5
5
|
Classifier: Operating System :: POSIX :: Linux
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
@@ -91,7 +91,7 @@ with (
|
|
|
91
91
|
|
|
92
92
|
Check the [platform and MongoDB requirements](https://alessio-locatelli.github.io/client-query-cache/getting-started/installation/#requirements) before installing. [Read eligibility](https://alessio-locatelli.github.io/client-query-cache/reference/api/#bypass-conditions) determines which requests can use the cache.
|
|
93
93
|
|
|
94
|
-
Invalidation is asynchronous: cached reads can
|
|
94
|
+
Eligible cache misses read from the primary with majority read concern; collections configured with another read preference or read concern bypass the cache. Invalidation is asynchronous, with no guaranteed delay: after a write, cached reads can return the preceding value until its change event is processed. There is no time-to-live, entry-age limit or manual invalidation call. Use direct PyMongo reads with suitable consistency controls for read-after-write and current authorization; see [consistency](https://alessio-locatelli.github.io/client-query-cache/usage/consistency/).
|
|
95
95
|
|
|
96
96
|
## Run an application
|
|
97
97
|
|
|
@@ -66,7 +66,7 @@ with (
|
|
|
66
66
|
|
|
67
67
|
Check the [platform and MongoDB requirements](https://alessio-locatelli.github.io/client-query-cache/getting-started/installation/#requirements) before installing. [Read eligibility](https://alessio-locatelli.github.io/client-query-cache/reference/api/#bypass-conditions) determines which requests can use the cache.
|
|
68
68
|
|
|
69
|
-
Invalidation is asynchronous: cached reads can
|
|
69
|
+
Eligible cache misses read from the primary with majority read concern; collections configured with another read preference or read concern bypass the cache. Invalidation is asynchronous, with no guaranteed delay: after a write, cached reads can return the preceding value until its change event is processed. There is no time-to-live, entry-age limit or manual invalidation call. Use direct PyMongo reads with suitable consistency controls for read-after-write and current authorization; see [consistency](https://alessio-locatelli.github.io/client-query-cache/usage/consistency/).
|
|
70
70
|
|
|
71
71
|
## Run an application
|
|
72
72
|
|
|
@@ -34,6 +34,7 @@ dependencies = [
|
|
|
34
34
|
"libc",
|
|
35
35
|
"loom",
|
|
36
36
|
"pyo3",
|
|
37
|
+
"rustc-hash",
|
|
37
38
|
]
|
|
38
39
|
|
|
39
40
|
[[package]]
|
|
@@ -228,6 +229,12 @@ version = "0.8.11"
|
|
|
228
229
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
229
230
|
checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
|
|
230
231
|
|
|
232
|
+
[[package]]
|
|
233
|
+
name = "rustc-hash"
|
|
234
|
+
version = "2.1.3"
|
|
235
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
236
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
237
|
+
|
|
231
238
|
[[package]]
|
|
232
239
|
name = "rustversion"
|
|
233
240
|
version = "1.0.23"
|
|
@@ -20,6 +20,7 @@ python = ["dep:pyo3"]
|
|
|
20
20
|
[dependencies]
|
|
21
21
|
libc = "0.2.190"
|
|
22
22
|
pyo3 = { version = "0.30.1", features = ["abi3-py314"], optional = true }
|
|
23
|
+
rustc-hash = "2.1.3"
|
|
23
24
|
|
|
24
25
|
[target.'cfg(loom)'.dependencies]
|
|
25
26
|
loom = "0.7.2"
|
|
@@ -28,3 +29,11 @@ loom = "0.7.2"
|
|
|
28
29
|
# Rust 1.95 check-cfg: https://doc.rust-lang.org/rustc/check-cfg/cargo-specifics.html
|
|
29
30
|
# The default is warning on every cfg name Cargo does not declare. We override it because the loom model tests are selected with --cfg loom.
|
|
30
31
|
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(loom)"] }
|
|
32
|
+
|
|
33
|
+
[profile.release]
|
|
34
|
+
# Cargo 1.99 lto: https://doc.rust-lang.org/cargo/reference/profiles.html#lto
|
|
35
|
+
# The default is false, which optimizes across a crate's own code generation units only. We override it because whole-program optimization across the crate and PyO3 shortens the native cache entry points (reports/rust-build-profile/summary.md).
|
|
36
|
+
lto = "fat"
|
|
37
|
+
# Cargo 1.99 codegen-units: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
|
|
38
|
+
# The default is 16. We override it because a single unit lets the optimizer inline across the whole extension.
|
|
39
|
+
codegen-units = 1
|
|
@@ -4,7 +4,9 @@ use std::sync::Arc;
|
|
|
4
4
|
use pyo3::prelude::*;
|
|
5
5
|
use pyo3::types::PyBytes;
|
|
6
6
|
|
|
7
|
-
use super::{
|
|
7
|
+
use super::{
|
|
8
|
+
Capture, Handle, LocalOwner, NamespaceAdmission, ReleaseCapture, State, namespace_names,
|
|
9
|
+
};
|
|
8
10
|
use crate::clock::monotonic_ns;
|
|
9
11
|
use crate::index::{Block, Query};
|
|
10
12
|
use crate::python::{OwnerIndex, SessionRing};
|
|
@@ -615,7 +617,7 @@ impl SharedOwner {
|
|
|
615
617
|
discriminator,
|
|
616
618
|
encoded,
|
|
617
619
|
find_source,
|
|
618
|
-
|
|
620
|
+
NamespaceAdmission::Published((b"", shape_key)),
|
|
619
621
|
)?,
|
|
620
622
|
)
|
|
621
623
|
}
|