Hi there,
I want to use JCS for my web application, and have some thread safe question.
Here is scenario:
I have a JCS cache named ePINBatchReportCache, which is used to save the
ePIN Batch Report data.
Thread 1:
1) Get report data from Cache for key.
2) If not data found in the cache, then lock the cache for that key.
3) Get report data from database.
4) Put the report data in cache for key
5) Release lock for that key.
Thread 2:
1) Get the data from cache for key.
2) Wait for lock to be released (should have max wait time here).
3) Get the data from cache.
Does JCS have the above functionality -- lock the key of cache? Or I have to
put lock on the key in my web application source code?
Thank for your help.
Lucy
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
countries) for 2¢/min or less.