Extends Memcache with a method that takes a key, timeout, and a
function that will be called to produce the value if it is not
found in the cache.
Based on Zane Ashby's idea posted here:
public cache ($key, $timeout, $function)
Takes a callback function that generates the value
if it's not found in the cache.
Returns the data from cache, or from the callback and caches the results
for the next call.