This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// overriding sync to use local storage when possible | |
sync : function(method, model, options){ | |
var key, now, timestamp, refresh; | |
if(method === 'read' && this.constants.isStoredInLocalStorage) { | |
// only override sync if it is a fetch('read') request | |
key = this.getKey(); | |
if(key) { | |
now = new Date().getTime(); | |
timestamp = $storage.get(key + ":timestamp"); | |
refresh = options.forceRefresh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lib = require("./manifest.js"); | |
lib.mkmanifest({ | |
filename : "cache" | |
,path : "../coffee" | |
,version : "02" | |
,exclude : ['/.DS_Store', '/.htaccess', '/cache.manifest'] | |
/* | |
,network : ['/connect.php','/read.php'] | |
,fallback : ['/offline.html'] |