Skip to content

CacheDatabase class

Defined in

Namespace: Akavache Assembly: Akavache.dll Full name: Akavache.CacheDatabase Modifiers: public static

Summary

View source

        CacheDatabase is the main entry point for interacting with Akavache. It provides
        convenient static properties for accessing common cache locations.
        This V11 implementation uses a builder pattern for configuration.
        

Applies to

net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net10.0-macos26.0, net10.0-windows10.0.19041, net10.0-ios26.0, net10.0-android36.0, net9.0, net9.0-windows10.0.19041, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-ios17.5, net8.0-tvos17.2, net8.0-windows10.0.19041, net8.0-macos14.5, netstandard2.1, net481, net462, net471

Properties

NameSummary
static TaskpoolSchedulerGets or sets the Scheduler used for task pools.
static ApplicationNameGets the application name used for cache file paths.
static IsInitializedGets a value indicating whether CacheDatabase has been initialized.
static ForcedDateTimeKindGets the forced DateTime kind for DateTime serialization. When set, all DateTime values will be converted to this kind during cache operations.
static InMemoryGets the InMemory cache instance. This cache stores data only in memory and is lost when the application shuts down. Useful for temporary data and session state.
static LocalMachineGets the LocalMachine cache instance. This cache persists data but is suitable for temporary/cached data that can be safely deleted. On mobile platforms, the system may...
static SecureGets the Secure cache instance. This cache provides encrypted storage for sensitive data like credentials and API keys.
static UserAccountGets the UserAccount cache instance. This cache persists data and is suitable for storing user settings and preferences that should survive app restarts. On some platforms,...
static CurrentInstanceGets the current instance of the Akavache cache database. This instance provides access to blob caches and settings stores managed by Akavache.

Methods

NameSummary
static ShutdownShuts down all cache instances and flushes any pending operations. This should be called before the application terminates to ensure all data is properly saved.
static InitializeInitializes CacheDatabase with default in-memory caches and a required application name.
static CreateBuilderCreates a new Akavache builder for configuration with a required application name.
Inherited members