Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kilianc committed Jul 11, 2015
2 parents 9e2e498 + e0d731d commit 8dbbe1a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions cli/lib/webapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ const get = require('request').defaults({ encoding: null })
// serve frontend from s3
module.exports = function webapp(opts) {
let cache = Object.create(null)
let cacheTTL = opts.cacheTTL
let cacheTTL = opts.ttl
let s3 = opts.s3

/*!
* wipes out cache every cacheTTL ms
*/
setInterval(function () {
cache = Object.create(null)
debug('cleared cache')
}, cacheTTL)

/*!
* middleware
*/
Expand All @@ -35,13 +43,6 @@ module.exports = function webapp(opts) {
})
}

/*!
* wipes out cache every cachettl ms
*/
setInterval(function () {
cache = Object.create(null)
}, cacheTTL)

/*!
* serves req from cache
*/
Expand Down
2 changes: 1 addition & 1 deletion cli/rtail-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ if (!argv.webVersion) {
} else {
app.use(webapp({
s3: 'http://rtail.s3-website-us-east-1.amazonaws.com/' + argv.webVersion,
ttl: 6000 * 60 * 60
ttl: 1000 * 60 * 60 * 6 // 6H
}))

debug('serving webapp from: http://rtail.s3-website-us-east-1.amazonaws.com/%s', argv.webVersion)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rtail",
"version": "0.2.0",
"version": "0.2.1",
"description": "Terminal output to the browser in seconds, using UNIX pipes.",
"keywords": [
"tail",
Expand Down

0 comments on commit 8dbbe1a

Please sign in to comment.