backbone-db-cache

Caching support for backbone-db

Usage no npm install needed!

<script type="module">
  import backboneDbCache from 'https://cdn.skypack.dev/backbone-db-cache';
</script>

README

backbone-db-cache

Provides sync wrapper for caching & LRU cache.

Example:


var Db = require('backbone-db');
var CacheDb = require('backbone-db-cache');

var testModelCache = new CacheDb('testmodel-cache');
var TestModel = Model.extend({
  ...
  type: 'footype',
  sync: CacheDb.cachingSync(Db.sync, testModelCache)
});