Accessing ASP.NET Cache

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!
 
A

Ashish M Bhonkiya

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
 
D

daren

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.
 
C

coollzh

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top