c# - Store the cache data locally -


I develop a C # Winform application, it is a customer and connects to the web service to receive data. The data returned by Webservice is a datatile, the client will display it on a datagrid view.

My problem is that: The client will take more time to get all the data from the server (web service is not local with the client) so I have to use a thread to get the data . This is my model:

Create a thread to get client data -> complete the thread and send the event to the client -> Customer performance data on the datagrid view on the form

However, when the user closes the form, the user can open this form at some other time, and the customer will have to get the data again. This solution will give the customer gradually reasons.

So, I think about a cached data:

The client & lt; --- get / add / edit / delete ---> cached data --- get / add / edit / delete ---> server (web service)

please give me some Recommend example: Cached data should be developed in another app, which is a host similar to a customer? Or running in the cached data client.

Thank you. Hello

Update: Hello everyone, Maybe you think of my problem so far. I only want to cache the data in the lifetime of the client. I think the cache data is in memory It should be stored and when the customer wants to get the data, he will check with the cache.

You're easy to store in the store, and if you need it later, then this app Supports the addition of a backup location to stay alive (such as database, separate storage, file, etc.) and even beyond encryption. .

Use EntLib 3.1 if you are stuck with .NET 2.0. Not different in new enlibs with better optimization support (for caching, at least)


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -