Are timers safe for asp.net apps?

B

Brock Allen

Yes it will. But what if no one requests that data in the meantime? You've
wasted effort for something that's not needed. That's why I suggested the
lazy load approach. You still have timing issues, too. Say the cache times
out, the item is removed and then your callback happens, but it hasn't yet
recreated the item in the cache... And then a page comes along and tries
to read the cache. You still have to wite the code in the page to check for
null and go back to the DB to reload it.

-Brock
DevelopMentor
http://staff.develop.com/ballen
 
J

jensen bredal

Brock Allen said:
Yes it will. But what if no one requests that data in the meantime? You've
wasted effort for something that's not needed. That's why I suggested the
lazy load approach. You still have timing issues, too. Say the cache times
out, the item is removed and then your callback happens, but it hasn't yet
recreated the item in the cache... And then a page comes along and tries
to read the cache. You still have to wite the code in the page to check
for null and go back to the DB to reload it.

Well the second reason has convinced me that "Lazy load" has to be the way
to go.

Many Thanks

JB
 

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

Top