I am working on code which involves two steps,
Step 1 : In Step 1, We are passing three values (x,y,z) and ID to the servlet as given below,
http://xyz.com/myservlet?x=10&y=20&z=30&ID=555
So as shown above, we are passing three values 10,20,30
Step 2: Now there is another servlet which want to refer x,y and z values of ID 555.
I could save x,y,z to file against 555 or I could use Database to get x,y,z values.
But every time, If I perform Step2 or make call to servlet in step2, Is it good to read data from file every-time.
How can we make it more optimized ?
The correct way of doing this is to use the memcached system. Some web application servers support this “out-of-the-box”, while for others there exist third-party implementations (for example, jmemcached for Java).