0.16.0-beta.7

Prevent double writes to cache
Update build
This commit is contained in:
haad 2017-01-17 09:19:22 +01:00
parent c79a1a125f
commit ae9ad807c3
4 changed files with 7 additions and 2 deletions

2
dist/orbitdb.js vendored
View File

@ -4636,6 +4636,8 @@ var Cache = function () {
key: 'set',
value: function set(key, value) {
return new _promise2.default(function (resolve, reject) {
if (cache[key] === value) return resolve();
cache[key] = value;
if (filePath && store) {
lock(filePath, function (release) {

2
dist/orbitdb.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "orbit-db",
"version": "0.16.0-beta.6",
"version": "0.16.0-beta.7",
"description": "Distributed p2p database on IPFS",
"author": "Haad",
"license": "MIT",

View File

@ -12,6 +12,9 @@ const lock = new Lock()
class Cache {
static set(key, value) {
return new Promise((resolve, reject) => {
if (cache[key] === value)
return resolve()
cache[key] = value
if(filePath && store) {
lock(filePath, (release) => {