Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Caching in .Net Windows application

Tags:

c#

.net

caching

I am working in a windows based application which uses master data for every transaction. This master data normally doesn't change but in some cases it can be change. I am fetching this data into cache or DataSet once and use it for future transactions, but don't want to use time to extract data from database if data get changed in master table.

I want to create a dependency on a DataTable so that if data get changed only at that time it get information from database. As It is a windows based application and I didn't found any support for caching in Windows application, how can I do this either by caching or by DataSet?

like image 466
user1888859 Avatar asked Jan 25 '13 09:01

user1888859


1 Answers

"As It is a windows based application and I didn't found any support for caching in Windows application"

This is False.

You can get caching class in Framework 4.0. It can be either windows based applications or web-based. Here are the docs.

Example:

 using System.Runtime.Caching;

 private static MemoryCache cache = MemoryCache.Default;
like image 177
Abdul Saboor Avatar answered Oct 31 '22 07:10

Abdul Saboor