Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Commit

Permalink
added way of clearing cache (closes #29)
Browse files Browse the repository at this point in the history
  • Loading branch information
benfoxall committed Jul 9, 2012
1 parent 8e0c3cf commit d7d7adb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions clearcache.js
@@ -0,0 +1,18 @@
/*
This flushes all the keys in redistogo instance
local:
REDISTOGO_URL=the_redis_url node flushcache.js
heroku:
heroku run node flushcache.js --app aidview
*/

var redis = require('redis-url').createClient(process.env.REDISTOGO_URL);

console.log("running flushdb on redis to go");

redis.flushdb(function(){
console.log("complete");
process.exit(0);
});
4 changes: 4 additions & 0 deletions readme.md
Expand Up @@ -86,6 +86,10 @@ And to use redis locally

…Just now - there isn't a good option for cache expiry, but removing and adding the add-on should do the trick.

There is a script that will expire the redis cache, this can be run on heroku using:

heroku run node clearcache.js --app aidview


### Analytics

Expand Down

0 comments on commit d7d7adb

Please sign in to comment.