cachinglayer

This module defines functions that are mixed into remoteStorage.local when it is instantiated (currently one of indexeddb.js, localstorage.js, or inmemorystorage.js).

All remoteStorage.local implementations should therefore implement this.getNodes, this.setNodes, and this.forAllNodes.  The rest is blended in here to create a GPD (get/put/delete) interface which the BaseClient can talk to.

Summary
cachinglayerThis module defines functions that are mixed into remoteStorage.local when it is instantiated (currently one of indexeddb.js, localstorage.js, or inmemorystorage.js).
Functions
fixArrayBuffersTakes an object and its copy as produced by the _deepClone function below, and finds and fixes any ArrayBuffers that were cast to `{}` instead of being cloned to new ArrayBuffers with the same content.
cachingLayerMixes common caching layer functionality into an object.

Functions

fixArrayBuffers

function fixArrayBuffers(srcObj,
dstObj)

Takes an object and its copy as produced by the _deepClone function below, and finds and fixes any ArrayBuffers that were cast to `{}` instead of being cloned to new ArrayBuffers with the same content.

It recurses into sub-objects, but skips arrays if they occur.

cachingLayer

RemoteStorage.cachingLayer = function(object)

Mixes common caching layer functionality into an object.

The first parameter is always the object to be extended.

Example

var MyConstructor = function() {
  cachingLayer(this);
};
function fixArrayBuffers(srcObj,
dstObj)
Takes an object and its copy as produced by the _deepClone function below, and finds and fixes any ArrayBuffers that were cast to `{}` instead of being cloned to new ArrayBuffers with the same content.
RemoteStorage.cachingLayer = function(object)
Mixes common caching layer functionality into an object.
Close