Link Search Menu Expand Document

PrimaryCache


A cacher class for the class primary property. It uses PrimaryMapper internally to extract results and caches them for future use.

Internally, this class is widely used within the library.

Methods

Below are the methods available from this class.

FlushAllows you to flush the caches.
GetReturns the list of Field objects.

Usability

Call the Get() method by passing the class type:

var primary = PrimaryCache.Get(typeof(Person));
// Use the 'primary' here

Or via generic type:

var primary = PrimaryCache.Get<Person>();
// Use the 'primary' here

Internally, it uses PrimaryMapper and PropertyCache to extract ClassProperty objects and filter them using IsPrimary().