Insert or update a cached object.
(&self, uid: String, owm: ObjectWithMetadata)
| 101 | |
| 102 | /// Insert or update a cached object. |
| 103 | pub async fn insert(&self, uid: String, owm: ObjectWithMetadata) -> DbResult<()> { |
| 104 | let fingerprint = self.fingerprinter.fingerprint(owm.object())?; |
| 105 | self.inner |
| 106 | .insert( |
| 107 | uid, |
| 108 | CachedEntry { |
| 109 | owm: Arc::new(owm), |
| 110 | fingerprint, |
| 111 | }, |
| 112 | ) |
| 113 | .await; |
| 114 | Ok(()) |
| 115 | } |
| 116 | |
| 117 | /// Insert or update a cached object from an existing `Arc`. |
| 118 | /// |