Skip to content

Commit aae6151

Browse files
authored
refactor(ads-client): updating ads client cache control (#7036)
refactor: ads-client API another refactor pass - needs tests Updating name for PlacementConfig -> PlacementRequest Adding some tests working forced failures for store. Adding new cache policy to include optional ttl we should now be respecting ttl comments and clearer size names ttl cleanup test ttl policy requested changes more changes enviornment conversion to url into its own method on env clearer pattern around cache modes updated docs more doc updates Changelog updates small fixes for names and style making default prod and staging urls URL type Readmeupdate
1 parent d672e3f commit aae6151

File tree

13 files changed

+1439
-220
lines changed

13 files changed

+1439
-220
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
- Updated the ApiError enum to AdsClientApiError to avoid naming collision.
3434
- The `context_id` is now generated and rotated via the existing eponym component crate.
3535
- Added request caching mechanism using SQLite with configurable TTL and max size.
36+
- Added configuration options for the cache.
3637

3738
### Relay
3839
- **⚠️ Breaking Change:** The error handling for the Relay component has been refactored for stronger forward compatibility and more transparent error reporting in Swift and Kotlin via UniFFI.

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/ads-client/Cargo.toml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,25 @@ version = "0.1.0"
44
edition = "2021"
55
license = "MPL-2.0"
66

7+
[features]
8+
dev = []
9+
default = []
10+
711
[dependencies]
812
chrono = "0.4"
913
context_id = { path = "../context_id" }
1014
error-support = { path = "../support/error" }
1115
parking_lot = "0.12"
1216
rusqlite = { version = "0.37.0", features = [
13-
"functions",
14-
"bundled",
15-
"serde_json",
16-
"unlock_notify",
17+
"functions",
18+
"bundled",
19+
"serde_json",
20+
"unlock_notify",
1721
] }
1822
serde = "1"
1923
serde_json = "1"
2024
thiserror = "2"
25+
once_cell = "1.5"
2126
uniffi = { version = "0.29.0" }
2227
url = "2"
2328
uuid = { version = "1.3", features = ["v4"] }

components/ads-client/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ Tests are run with
1919
```shell
2020
cargo test -p ads-client
2121
```
22+
23+
## Usage
24+
25+
Please refer to `./docs/usage.md` for information on using the component.

0 commit comments

Comments
 (0)