Skip to content

Instantly share code, notes, and snippets.

View giles-v's full-sized avatar

Giles Copp giles-v

  • Dropbox
  • Hudson Valley, NY
View GitHub Profile
@giles-v
giles-v / resilient-redis-cache.js
Created January 11, 2018 17:13
Redis caching module which can reconnect if the connection drops
import redis from 'redis';
const RECONNECT_TIME_THRESHOLD = 10000;
const keyNotFoundError = new Error('Key not found');
keyNotFoundError.keyNotFound = true;
const internals = {
redis,
reconnectTimeout: null,
@giles-v
giles-v / keybase.md
Created January 15, 2015 14:53
Keybase verification

Keybase proof

I hereby claim:

  • I am giles-v on github.
  • I am chafir (https://keybase.io/chafir) on keybase.
  • I have a public key whose fingerprint is 52AB CBE9 FB32 7000 3D2B 6191 E200 E0C9 793D E8A4

To claim this, I am signing this object: