A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Storing ranges in cache keys
Joined: Feb 19, 2014
Feb 19, 2014 12:50:10
My db row has sample data as below
Example StoreId ProductId Eff_Date End_Date Discount 123 456 01-01-2001 12-31-2001 10% 123 456 01-01-2002 12-31-2002 15%
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.
subject: Storing ranges in cache keys
Get Sum of column and the retrive the data month wise.
Conversion help plz!!!
Hibernate: one-to-one Different Composite Keys
How to calculate date in Java
Database to Hashmap
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015