TortugaResearch / DotNet-ORM-Cookbook

This repository is meant to show how to perform common tasks using C# with variety of ORMs.
https://tortugaresearch.github.io/DotNet-ORM-Cookbook/
The Unlicense
345 stars 29 forks source link

Use Case: Cache results #45

Open Grauenwolf opened 4 years ago

Grauenwolf commented 4 years ago

Cache result on the first call and return the cached version in future requests.

Used for static lookup tables.

Grauenwolf commented 4 years ago

Combine with immutable example.

EDIT: This isn't needed for NHibernate because it caches values, not objects. This protects the cache from fouling.

Grauenwolf commented 4 years ago

NHibernate: https://nhibernate.info/doc/nhibernate-reference/caches.html