I'm looking a way to create fast C# Winforms database application.
I need that all data read from database is stored in memory cache.
Every time when object is required cache should be examined first.
Database access should be performed only if object does not exist in cache.
I looked into sample business objects and found code like
public CustomerEntity GetCustomerByID(string customerID) {
return this.GetEntity("CustomersSelectByPK",
this.CreateParameter("@CustomerID", customerID));
}
In this case every retrieval of customer causes database access over internet which makes application very slow.
Doc does not contain any information how to implement caching.
Any idea how to implement caching so that when customerID was previously fetched from database it is not fetched again?
Andrus