Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

Update README.md #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ module.exports = {
// Or different database client - memcached, mongodb, ...
const redis = require('redis');
const crypto = require('crypto');

const BJSON = require('buffer-json');
// ...
// connect to client
// ...
Expand Down Expand Up @@ -117,7 +117,7 @@ function read(key, callback) {
}

try {
let data = JSON.parse(result);
let data = BJSON.parse(result);
callback(null, data);
} catch (e) {
callback(e);
Expand All @@ -127,7 +127,7 @@ function read(key, callback) {

// Write data to database under cacheKey
function write(key, data, callback) {
client.set(key, JSON.stringify(data), 'EX', BUILD_CACHE_TIMEOUT, callback);
client.set(key, BJSON.stringify(data), 'EX', BUILD_CACHE_TIMEOUT, callback);
}

module.exports = {
Expand Down