Skip to content

Commit

Permalink
Merge pull request #32 from TravisFrankMTG/master
Browse files Browse the repository at this point in the history
Small client-side cache bugfixes
  • Loading branch information
travismfrank authored Sep 18, 2020
2 parents 3b14080 + ebc3d20 commit dda95be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ObsidianWrapper/ObsidianWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ function ObsidianWrapper(props) {
updateCache(hash, updatedCache[key][hash]);
}
}
return resp;
});
/* COMMENT OUT THESE LINES FOR SERVER CACHE */
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/destructureQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { findTypeSchemaName, findProp } from './hashOps.js';
// Attempt to rebuild results object if all hashes are found in Redis //
export default async function destructureQueries(query, obsidianSchema, cache) {
// Stringify to expose newline characters //
query = JSON.stringify(query)
query = JSON.stringify(query);

// Destructure query into array of minified sub-queries //
const queryHashes = await findSpecificQueries(query, obsidianSchema, cache);
Expand Down Expand Up @@ -69,7 +69,7 @@ async function buildResultsObject(hashes, obsidianSchema, queryObj, cache) {
queryResult[id][property] = propVal;
// If this field is complex, recursive call to build nested property object //
} else {
let partialHashes = await retrieveComplex(hashes[j]);
let partialHashes = await retrieveComplex(hashes[j], cache);
if (partialHashes[0] === '"') partialHashes = JSON.parse(partialHashes) // Added for odd edge case of double stringified complex types
// Field is ListType //
if (typeof partialHashes === 'object') {
Expand Down

0 comments on commit dda95be

Please sign in to comment.