I am using .NET Cache for WinForms application in C#. Application is directly connected to the remote database server (without any service layer) and the cache is maintained on client machine where application is installed.
Now I am making it to work on multiple machines on network and instances will be connected to the central database. Problem is that when one instance add record in database, other machines still contain the cache for old data.
I would need to know the possible solution to make this cache central for all application instances on network so when data is modified by one instance, cache will be refreshed for the rest of network nodes.
How can we implement the central cache for all application instances on network?
we had same issue and we implement the cache into the database.
(If you don't have any service Layer, you can use DB Layer Procedure or Trigger Etc..)
Firstly we made Cashe Table. for example CACHE_DATA.
And After machine(more than one) executes DML(Update, Insert, Delete Data), the Service Layer(or DB) Updates a Cache Data based on the newest Information. so that other Machines also can refer to that Table.
If DML executed too often, you can add "Last Cashing Time" Filed in CHACHE_DATA.
If(Last Cashing Time < Casing_Interval ) { Do Not Chasing } else { Cahsing }