aspose file tools*
The moose likes EhCache and the fly likes Storing ranges in cache keys Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Caching » EhCache
Bookmark "Storing ranges in cache keys" Watch "Storing ranges in cache keys" New topic
Author

Storing ranges in cache keys

Mahi Gun
Greenhorn

Joined: Feb 19, 2014
Posts: 1
Hi all,

My db row has sample data as below

When a customer comes in, my code checks discount something like
select discount from table where storeId='123' and productId='456' and current_date<= EndDate and current_date>=Eff_date.

This works absolutely fine.

We need to store above data in cache. How can we store these date ranges in cache keys so that when customer purchases an item, we hit the right cache Key-value pair.


Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Storing ranges in cache keys