CacheDatabase class¶
Defined in
Namespace: Akavache
Assembly: Akavache.dll
Full name: Akavache.CacheDatabase
Modifiers: public static
Summary¶
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¶
| Name | Summary |
|---|---|
| static TaskpoolScheduler | Gets or sets the Scheduler used for task pools. |
| static ApplicationName | Gets the application name used for cache file paths. |
| static IsInitialized | Gets a value indicating whether CacheDatabase has been initialized. |
| static ForcedDateTimeKind | Gets the forced DateTime kind for DateTime serialization. When set, all DateTime values will be converted to this kind during cache operations. |
| static InMemory | Gets 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 LocalMachine | Gets 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 Secure | Gets the Secure cache instance. This cache provides encrypted storage for sensitive data like credentials and API keys. |
| static UserAccount | Gets 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 CurrentInstance | Gets the current instance of the Akavache cache database. This instance provides access to blob caches and settings stores managed by Akavache. |
Methods¶
| Name | Summary |
|---|---|
| static Shutdown | Shuts 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 Initialize | Initializes CacheDatabase with default in-memory caches and a required application name. |
| static CreateBuilder | Creates a new Akavache builder for configuration with a required application name. |