Arch :arch: on Nostr: I don’t think I can do what I want to do with this code… basically when a request ...
I don’t think I can do what I want to do with this code… basically when a request is invoked, I want my cache middleware to check if that page has been rendered and cached already, and return that if so. But at the same time I want to spawn a thread that runs through the rest of the request to check if the cache should be invalidated (e.g rendered content has changed). But I can’t move the request/next types provided by Axum into a thread. Maybe I’m thinking about this wrong? #Rust
Published at
2023-07-09 10:12:57Event JSON
{
"id": "ab1ad7c521d19cffd00b988dcca30d28b102aae517d1c3646c265634cd631fb3",
"pubkey": "ed02fc5fe168cd77e6a4acf5bc86b9aa9e1f2bc4ccf5cc99f289b82d8ab43b41",
"created_at": 1688897577,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"mostr",
"https://floofy.tech/users/arch/statuses/110683591644815875"
]
],
"content": "I don’t think I can do what I want to do with this code… basically when a request is invoked, I want my cache middleware to check if that page has been rendered and cached already, and return that if so. But at the same time I want to spawn a thread that runs through the rest of the request to check if the cache should be invalidated (e.g rendered content has changed). But I can’t move the request/next types provided by Axum into a thread. Maybe I’m thinking about this wrong? #Rust",
"sig": "0285bb975f9d1f7d672e3aaa297f44ec87756b41ddb72c5df0a79bb3f924118804c140a92baa7918c107986b519ae8bac4a43b3b459bda1e1be15f38f2040d84"
}