Accessing ASP.NET Cache

  • Thread starter Thread starter Daren
  • Start date Start date
D

Daren

Hi all,

I need to update the cache of a third party asp.net application when a
user makes a change to a particular table in a SQL Server database (so
the changes appear immediately in the browser). I have a trigger on
the table that calls a COM wrapper, and inside that are calls to a
..net dll.

I've managed to get everthing working together, but I can not seem to
access the cache for the asp.net application from the .net dll.

I have tried httpcontext.current.cache and httpruntime.cache, but both
appear to be empty (even though I know the cache is not empty).

Does any one know how I access an applications cache? Can it even be
done?

Thanks!
 
Hi Daren,
I need to update the cache of a third party asp.net application when a
user makes a change to a particular table in a SQL Server database (so
the changes appear immediately in the browser). I have a trigger on
the table that calls a COM wrapper, and inside that are calls to a
.net dll.

if you want to just invalidate the cache whenever you are updating a
particular table then create the cache with filedependency on
"someblank.txt" file. Write a trigger that always overwrites this blankfile
whenever the values in the table is updated.

also please take a look here
http://authors.aspalliance.com/nauticaljustin/home/default.aspx?page=articles/SqlCache_Part1

HTH
Regards
Ashish M Bhonkiya
 
Hi Ashish,

Thanks for replying.

I do not have the source code of the asp.net application, so presumably
I can not link the application cache to a file? Sorry for my ignorance,
this is all new to me!

Any other suggestions would be appreciated.

Many thanks.
 
you can not do that way, because your dll and asp.net run in tow defferent
process, you can not access the memory of asp.net appDomain
 
Back
Top