Permalink
Browse files

Changes the database xmla cache to save entries as XML rather than a …

…Base64 encoded value.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@423 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information...
lucboudreau committed Mar 22, 2011
1 parent 0f53c0a commit 79dbd1d8efb6552a6ad6dc1c8f9fbaade59dc945
@@ -120,13 +120,11 @@ public void flushCache() {
connection.prepareStatement(
Properties.QUERY_SELECT.getValueOrDefault(props));
try {
- stm.setString(
- 1,
- XmlaOlap4jShaEncoder.encodeSha1(new String(request)));
+ stm.setString(1, new String(request));
stm.execute();
ResultSet rs = stm.getResultSet();
if (rs.next()) {
- return Base64.decode(rs.getString(2));
+ return rs.getString(2).getBytes();
} else {
return null;
}
@@ -149,10 +147,8 @@ public void put(String id, URL url, byte[] request, byte[] response)
connection.prepareStatement(
Properties.QUERY_INSERT.getValueOrDefault(props));
try {
- stm.setString(
- 1,
- XmlaOlap4jShaEncoder.encodeSha1(new String(request)));
- stm.setString(2, Base64.encodeBytes(response));
+ stm.setString(1,new String(request));
+ stm.setString(2, new String(response));
stm.execute();
} finally {
stm.close();
Binary file not shown.

0 comments on commit 79dbd1d

Please sign in to comment.