Skip to main content

Crate tauri_plugin_redb_cache

Crate tauri_plugin_redb_cache 

Source
Expand description

§Tauri Plugin Redb Cache

A Tauri plugin for HTTP and image caching using Redb with LRU memory cache and compression.

§Features

  • Two-tier caching: LRU memory cache + Redb persistent storage
  • Automatic Zlib compression for large data (>1KB)
  • Separate tables for HTTP responses and images
  • Configurable TTL, memory cache size, and compression threshold
  • Background cleanup task for expired entries

§Usage

fn main() {
    tauri::Builder::default()
        .plugin(tauri_plugin_redb_cache::Builder::new().build())
        .run(tauri::generate_context!())
        .unwrap();
}

Structs§

Builder
Plugin builder
CacheConfig
Cache configuration

Functions§

get_config
Get the plugin configuration
init
Initialize the plugin with the given app handle