diff options
Diffstat (limited to 'cache/src/backends/mod.rs')
| -rw-r--r-- | cache/src/backends/mod.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cache/src/backends/mod.rs b/cache/src/backends/mod.rs new file mode 100644 index 0000000..370c5ab --- /dev/null +++ b/cache/src/backends/mod.rs @@ -0,0 +1,14 @@ +/* + This file is part of jellything (https://codeberg.org/metamuffin/jellything) + which is licensed under the GNU Affero General Public License (version 3); see /COPYING. + Copyright (C) 2025 metamuffin <metamuffin.org> +*/ +pub mod filesystem; + +use crate::CacheKey; +use anyhow::Result; + +pub(crate) trait CacheStorage: Send + Sync + 'static { + fn store(&self, key: CacheKey, value: &[u8]) -> Result<()>; + fn read(&self, key: CacheKey) -> Result<Option<Vec<u8>>>; +} |