These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: SysCache2, callbacks, and ajax
PostPosted: Sat Nov 03, 2007 12:32 am 
Newbie

Joined: Wed Jul 25, 2007 10:53 am
Posts: 7
Is there a way to call a function when the cache expires due to time expiration or table-based dependency when using SysCache2 and SQL Server 2005. I would like to to use this callback to trigger an ajax page refresh and display the latest information coming from the database. Any help would be greatly appreciated.

Thanking you in advance
Francis


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 9:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
HTTP request is one-way -- from client to server. Therefore, it does not matter what one does on the server-side, it cannot trigger something to happen on the client-side. In other words, the server cannot respond to something that has not been requested.

_________________
Karl Chu


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 1:03 pm 
Newbie

Joined: Wed Jul 25, 2007 10:53 am
Posts: 7
Thanks for answering. Since SysCache2 is built on top of the System.Web.Caching.Cache class, that class has the following member function.

public Object Add (
string key,
Object value,
CacheDependency dependencies,
DateTime absoluteExpiration,
TimeSpan slidingExpiration,
CacheItemPriority priority,
CacheItemRemovedCallback onRemoveCallback
)

I just want to be able to set the onRemoveCallback parameter using SysCache2. Is that possible? Any feedback would be greatly appreciated.

Thanking you in advance
Francis


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 03, 2007 2:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
As far as I can tell, SysCache2 does not propagate the callback out. In other words, SysCache2 only uses the onRemoveCallback parameter internally and does not raise any event that user code can use. Someone who is more familiar with the SysCache2 implementation may be in a better position to comment more on this than I can.

_________________
Karl Chu


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.