solution/code/design etc.
"Keith F." <KeithF@discussions.microsoft.com> wrote in message
news:FF565E99-3A6D-4EB5-B916-1DF06A9E65C0@microsoft.com...
> Hi,
> I'm trying to implement caching for an ASP.NET web app, to reduce calls to
> our backend database (sql server). The object I want to cache is a simple
> data table.
> The tricky part is that throughout the day, I need to be able to update
> individual records. The updates are infrequent. Each record will probably
> be
> updated once sometime during the day. But this table will be read
> thousands
> of times. So caching will save thousands of database calls.
>
> I've read about using the ReaderWriterLock class at the following site:
>
http://msdn.microsoft.com/msdnmag/issues/05/02/BasicInstincts/default.aspx >
> I've experimented with creating a custom class, I'll call it the
> CacheManager, that will be the "gate-keeper" for my data table cache
> object
> and use the ReaderWriterLock class to make sure only one update happens at
> a
> time.
> In order for this to work, I've found that I have to Cache an instance of
> my
> CacheManager, and all requests to read or update the data table cache
> object,
> go through that instance of CacheManager.
>
> In some basic testing using multiple browser sessions, this approach seems
> to work. But I want to make sure this will work with a hundred or more
> users.
>
> Does this seem like the right approach, or is there a better approach to
> accomplish this?
>
> I would appreciate any suggestions/advice that you might have.
>
> Thanks,
> Keith F
>