This week's book giveaway is in the Java in General forum. We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line! See this thread for details.
Hi, most caches including EhCache works like a Java map (ie key value pair). But it's typically used to cache database records which are returned as a row with multiple columns.
So how does it work? The key for the cache is holding the rowname, and the value is holding say an array which contains all the columns? Or for each row you have an array of these key-value pair, where the keys are the column names and the values are the cell values?
Either approach is possible, and I'm sure one could come up with yet more designs. What is most suitable depends on the circumstances. Does it matter how it's done, as long as it works? (Which is my snarky way of asking: "What prompted this question?" :-)
posted 3 years ago
Okay and is that how it's typically used? The reason I'm asking is because it seems to be a rather non straight forward way of storing results returned from a database. If it's like that why don't I use a vector of vector instead?
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
Thread Boost - a very different sort of advertising