Skip to content

Instantly share code, notes, and snippets.

@DanielNill
DanielNill / gist:1677714
Created January 25, 2012 18:19 — forked from fennb/gist:1124578
Synchronous cache failover example
// synchronous version
myThing = synchronousCache.get("id:3244");
if (myThing == null) {
myThing = synchronousDB.query("SELECT * from something WHERE id = 3244");
}
// Do various stuff with myThing here