Table of Contents

Interface IAkavacheBuilder

Namespace
Akavache
Assembly
Akavache.dll

Interface for building and configuring BlobCache instances.

public interface IAkavacheBuilder : IAkavacheInstance
Inherited Members
Extension Methods

Properties

FileLocationOption

Gets the file location option.

FileLocationOption FileLocationOption { get; }

Property Value

FileLocationOption

The file location option.

Methods

Build()

Builds the configuration and returns the configured Akavache instance.

IAkavacheInstance Build()

Returns

IAkavacheInstance

The configured Akavache instance ready for use.

UseForcedDateTimeKind(DateTimeKind)

Sets the forced DateTime kind for serialization operations.

IAkavacheBuilder UseForcedDateTimeKind(DateTimeKind kind)

Parameters

kind DateTimeKind

The DateTime kind to use for all DateTime serialization.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

WithApplicationName(string?)

Sets the application name for cache directory paths.

IAkavacheBuilder WithApplicationName(string? applicationName)

Parameters

applicationName string

The application name.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

WithInMemory(IBlobCache)

Sets the InMemory cache instance.

IAkavacheBuilder WithInMemory(IBlobCache cache)

Parameters

cache IBlobCache

The cache instance to use for InMemory operations.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

WithInMemoryDefaults()

Configures default in-memory caches for all cache types. Uses the appropriate InMemoryBlobCache based on the configured serializer.

IAkavacheBuilder WithInMemoryDefaults()

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

WithLocalMachine(IBlobCache)

Sets the LocalMachine cache instance.

IAkavacheBuilder WithLocalMachine(IBlobCache cache)

Parameters

cache IBlobCache

The cache instance to use for LocalMachine operations.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

WithSecure(ISecureBlobCache)

Sets the Secure cache instance.

IAkavacheBuilder WithSecure(ISecureBlobCache cache)

Parameters

cache ISecureBlobCache

The secure cache instance to use for Secure operations.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

WithSerializer<T>()

Configures the serializer to use for cache operations.

IAkavacheBuilder WithSerializer<T>() where T : ISerializer, new()

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

Type Parameters

T

The type of serializer to configure.

WithSerializer<T>(Func<T>)

Configures the serializer to use for cache operations with a custom factory function.

IAkavacheBuilder WithSerializer<T>(Func<T> configure) where T : ISerializer

Parameters

configure Func<T>

A function that creates and configures the serializer instance.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.

Type Parameters

T

The type of serializer to configure.

WithUserAccount(IBlobCache)

Sets the UserAccount cache instance.

IAkavacheBuilder WithUserAccount(IBlobCache cache)

Parameters

cache IBlobCache

The cache instance to use for UserAccount operations.

Returns

IAkavacheBuilder

The builder instance for fluent configuration.