Joe,
Basically what am doing is generating a token based on the user selection of the values in the fields in GUI. 3 scenarios can exist for these selections --
AN user can select multiple products (am storing only productids.which is numeric..and 4-5 digts in length....)
AN user can select multiple vendors(am storing only vendorids.which is numeric. usially 2-3 digits in lenght)
AN user can select both multiple products and vendors( which is again numberic values productid and vendorid)....
So I have an array whcih contains these numbers. I sort this array and build a plain
string by looping thru the array.....so the length of the string might be 200+ characters if more selections are made.
Based on this I decide whehter the key already exists in my cache so that I can avoid the trip to DB for doing some calculations.
If another user also selects the same productid, vendorid and productid+vendorid combination i should get the same key so that I can use the cached data without hitting the DB
lets say userA has selected --
productID = 2456
vendorID = 34
productid,vendorid = 2834 , 18
So my token will be 183424562834 (after sorting and looping the array)
If the userB selects the same combination... his token will also be the same
Suppose an userC has following combination--
productID= 1834, 2456,2834 ( he has selected multiple products)
VendorId === NONE selected
ProductId,vendorId = NONE selected
Now also the generated toke will be 183424562834.
So my cache result will always be wrong.
Is there any good token generation process so that i can handle all these conditions.
Thx in advance
U