Skip to content

Commit

Permalink
Changes the database xmla cache to save entries as XML rather than a …
Browse files Browse the repository at this point in the history
…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 79dbd1d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions testsrc/org/olap4j/driver/xmla/cache/XmlaDatabaseCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,11 @@ public byte[] get(String id, URL url, byte[] request)
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;
}
Expand All @@ -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();
Expand Down
Binary file modified xmla-cache/xmla-cache-hsqldb-mondrian-3.3-SNAPSHOT.zip
Binary file not shown.

0 comments on commit 79dbd1d

Please sign in to comment.