A cacher class for the class identity property. Underneath, it uses the IdentityMapper class to extract the results and caching it for future use. It provides a 2nd-layer caching for the library when it comes to the class identity property extraction. As a result, the library is fast-enough when reusing the already extracted class identity property on any execution.
Below are the methods available from this class.
Flush- allows you to flush the caches.
Get- returns the list of Field objects.
You should only use this class if you would like to get the references of the class identity property in general purpose.
How to Use?
You can simply call the
Get() method of this class by passing the class type.
var identity = IdentityCache.Get(typeof(Person)); // Use the 'identity' here
Or, via generic type.
var identity = IdentityCache.Get<Person>(); // Use the 'identity' here