performance fixes

This commit is contained in:
nvrl committed 2026-06-30 05:56:21 +02:00
1 parent 8e8d42ad3b
commit b3e8e8ab96
3 files changed
+157 -81

No files matched your search

+9 -1
View File
@@ -85,11 +85,19 @@ pub struct PhotoItem {
/// The daemon's reply to a [`Request`].
#[derive(Serialize, Deserialize, Debug)]
pub enum Response {
/// Current mount status.
/// Current mount status. Carries the cache stats the daemon already holds
/// (`used`/`budget` bytes and the pin list) so a front-end never has to open
/// the on-disk cache itself on its UI thread.
Status {
username: String,
mountpoint: String,
pinned: usize,
/// Bytes of cached content blobs (see [`crate::cache::ContentCache::usage`]).
used: u64,
/// Configured soft byte cap (`0` = unlimited).
budget: u64,
/// The pin registry.
pins: Vec<Pin>,
},
/// A human-readable success message.
Ok { message: String },