aboutsummaryrefslogtreecommitdiff
path: root/cache/src/lib.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-01-24 23:06:33 +0100
committermetamuffin <metamuffin@disroot.org>2026-01-24 23:06:33 +0100
commit2bcccb18a6cb8bf836f57c3d86f759b19699def2 (patch)
treeef55a10c6d9703677a983b8ca900fb4578a08eb3 /cache/src/lib.rs
parentb2e88a8beabf04adc28947cf82996e8692a68b71 (diff)
downloadjellything-2bcccb18a6cb8bf836f57c3d86f759b19699def2.tar
jellything-2bcccb18a6cb8bf836f57c3d86f759b19699def2.tar.bz2
jellything-2bcccb18a6cb8bf836f57c3d86f759b19699def2.tar.zst
cache as object
Diffstat (limited to 'cache/src/lib.rs')
-rw-r--r--cache/src/lib.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/cache/src/lib.rs b/cache/src/lib.rs
index be2b331..4d6bbcf 100644
--- a/cache/src/lib.rs
+++ b/cache/src/lib.rs
@@ -81,14 +81,10 @@ impl Cache {
Ok(out)
}
- pub fn cache_read(&self, key: &str) -> Result<Option<Vec<u8>>> {
+ pub fn read(&self, key: &str) -> Result<Option<Vec<u8>>> {
self.storage.read(key)
}
- pub fn cache_store(
- &self,
- key: String,
- generate: impl FnOnce() -> Result<Vec<u8>>,
- ) -> Result<String> {
+ pub fn store(&self, key: String, generate: impl FnOnce() -> Result<Vec<u8>>) -> Result<String> {
self.cache(&key, generate)?;
Ok(key)
}