Table of Contents

Class TaskCachePool

Namespace
GreenDonut
Assembly
GreenDonut.dll

This helper class gives easy access to cache pool factories and the shared cache pool.

public static class TaskCachePool
Inheritance
TaskCachePool
Inherited Members

Properties

Shared

The shared cache pool that is used when no cache was provided through the options.

public static ObjectPool<TaskCache> Shared { get; }

Property Value

ObjectPool<TaskCache>

Methods

Create(ObjectPoolProvider, int)

Creates an instance of DefaultObjectPool<T>.

public static ObjectPool<TaskCache> Create(ObjectPoolProvider provider, int cacheSize = 256)

Parameters

provider ObjectPoolProvider

The Provider to create the DefaultObjectPool<T> instance.

cacheSize int

The size of pooled caches.

Returns

ObjectPool<TaskCache>

Returns the newly created instance of DefaultObjectPool<T>.

Create(int, int?)

Creates an instance of DefaultObjectPool<T>.

public static ObjectPool<TaskCache> Create(int cacheSize = 256, int? maximumRetained = null)

Parameters

cacheSize int

The size of pooled caches.

maximumRetained int?

The maximum number of objects to retain in the pool.

Returns

ObjectPool<TaskCache>

Returns the newly created instance of DefaultObjectPool<T>.