cache github data for an hour

This commit is contained in:
Sami Samhuri 2010-12-08 22:30:35 -08:00
parent d156e343bc
commit 6e5d04a501
3 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@
}
var t = data.get('t-' + name)
if (!t || +new Date() - t > 86400000) {
if (!t || +new Date() - t > 3600 * 1000) {
console.log('stale ' + String(t))
data.set('t-' + name, +new Date())
GITR.repo('samsonjs/' + name)

View file

@ -69,7 +69,7 @@
var data = createObjectStore('proj')
, t = data.get('t-proj')
, names = ['followers', 'following', 'repos', 'watched']
if (!t || +new Date() - t > 86400000) {
if (!t || +new Date() - t > 3600 * 1000) {
console.log('stale ' + String(t))
data.set('t-proj', +new Date())
names.forEach(function(name) {

View file

@ -75,7 +75,7 @@
var data = createObjectStore('proj')
, t = data.get('t-proj')
, names = ['followers', 'following', 'repos', 'watched']
if (!t || +new Date() - t > 86400000) {
if (!t || +new Date() - t > 3600 * 1000) {
console.log('stale ' + String(t))
data.set('t-proj', +new Date())
names.forEach(function(name) {