You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by da...@us.hsbc.com on 2008/02/18 09:46:16 UTC

Can I update the cache at a given time ?

Hi there,
 
I am using JCS in my project and I am new to it. I'm wondering if I can 
refresh a certain region of the cache at a given time (e.g. every 
midnight) using JCS's config or handlers. I know TimerTask can do such job 
but that needs additional thread. I appreciate if you could give me any 
advice.

Thanks & Regards
David

************************************************************
HSBC Software Development (Guangdong) Limited
whose office address is
5/F Jie Tai Plaza, 218 - 222 Zhong Shan Liu Road, Guangzhou,
The People's Republic of China
************************************************************


-----------------------------------------
*******************************************************************
This e-mail is confidential. It may also be legally privileged.
If you are not the addressee you may not copy, forward, disclose
or use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the
sender immediately by return e-mail.

Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability
for any errors or omissions.
*******************************************************************
"SAVE PAPER - THINK BEFORE YOU PRINT!" 

Re: Can I update the cache at a given time ?

Posted by da...@us.hsbc.com.
Just wanna share with you one approach I found, using the 
setMaxLifeSeconds method in IElementAttributes.
it can be used to control cache's TimeToLive
TimeToLiveSeconds = (max life + create time) - current time 
so that I can make the cache expired at any given time and next calling 
will update the cache.

Thanks & Regards
David



David Y Z WANG/ITD GLTC/HDPG/HSBC@HSBC 
02/18/2008 04:46 PM
Mail Size: 6222
Please respond to
"JCS Users List" <jc...@jakarta.apache.org>


To
jcs-users@jakarta.apache.org
cc

Subject
Can I update the cache at a given time ?
Our Ref

Your Ref







Hi there,
 
I am using JCS in my project and I am new to it. I'm wondering if I can 
refresh a certain region of the cache at a given time (e.g. every 
midnight) using JCS's config or handlers. I know TimerTask can do such job 

but that needs additional thread. I appreciate if you could give me any 
advice.

Thanks & Regards
David

************************************************************
HSBC Software Development (Guangdong) Limited
whose office address is
5/F Jie Tai Plaza, 218 - 222 Zhong Shan Liu Road, Guangzhou,
The People's Republic of China
************************************************************


-----------------------------------------
*******************************************************************
This e-mail is confidential. It may also be legally privileged.
If you are not the addressee you may not copy, forward, disclose
or use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the
sender immediately by return e-mail.

Internet communications cannot be guaranteed to be timely,
secure, error or virus-free. The sender does not accept liability
for any errors or omissions.
*******************************************************************
"SAVE PAPER - THINK BEFORE YOU PRINT!" 

------------------------
******************************************************************
This message originated from the Internet.  Its originator may or
may not be who they claim to be and the information contained in
the message and any attachments may or may not be accurate.
******************************************************************


************************************************************
HSBC Software Development (Guangdong) Limited
whose office address is
5/F Jie Tai Plaza, 218 - 222 Zhong Shan Liu Road, Guangzhou,
The People's Republic of China
************************************************************