Skip to content

Commit

Permalink
bigger image cache
Browse files Browse the repository at this point in the history
  • Loading branch information
makefu committed Jul 23, 2015
1 parent 248069b commit 77234c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/imagecache.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exports.createCache = function (imageFile, log) {
var images = Fs.readFileSync(imageFile, "utf8").split("\n");

images = images.filter(function (img) {
return (img.length > 4);
return (img.length > 6);
});

var imgCache = [];
Expand All @@ -41,7 +41,7 @@ exports.createCache = function (imageFile, log) {
nextImage: function nextimage() {
var image = images[Math.floor(images.length * Math.random())];

if (imgCache.length > 4) {
if (imgCache.length > 6) {
imgCache.shift();
}
imgCache.push(image);
Expand Down

0 comments on commit 77234c3

Please sign in to comment.