Table of Contents

Class LocalResourceCache

Namespace
Acuit.Pinpoint.ResourceManagement
Assembly
Acuit.Pinpoint.ResourceManagement.dll

A persistent object cache that uses a SQLite database.

public class LocalResourceCache : ILocalResourceCache, IDisposable
Inheritance
LocalResourceCache
Implements
Inherited Members

Remarks

Constructors

LocalResourceCache(LocalResourceCacheOptions, IErrorHandler, ITimeService)

Initializes a new instance of the LocalResourceCache class.

public LocalResourceCache(LocalResourceCacheOptions options, IErrorHandler errorHandler, ITimeService timeService)

Parameters

options LocalResourceCacheOptions

Options.

errorHandler IErrorHandler

The error handler service.

timeService ITimeService

The time service.

Exceptions

ArgumentNullException

options is null.

ArgumentNullException

timeService is null.

Methods

ClearAllConnectionPools()

Clears all connection pools for the database provider used by LocalResourceCache.

public static void ClearAllConnectionPools()

Remarks

This can be used to facilitate unit testing, to force all connections to be closed so that the cache file can be deleted.

CreateCacheEntryReference(Uri)

Creates a reference to a cache entry.

public ILocalCacheEntryReference CreateCacheEntryReference(Uri url)

Parameters

url Uri

The URL representing the cache key for the object.

Returns

ILocalCacheEntryReference

A ILocalCacheEntryReference that can be used to access the cache entry and that should be disposed when the reference is no longer needed.

Exceptions

ArgumentNullException

url is null.

Dispose()

Closes and releases all resources used by the object.

public void Dispose()

Dispose(bool)

Closes and releases all resources used by the object.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true when this is in response to a call to Dispose().

Remarks

Derived classes should override this when they have any resources that should be disposed.