/** * get the cache timeout. if pointing at test data, use a shorter time. * tunable by config flag, per app? could add that easily. */ protected function cacheTimeout() { return Cacher::cacheTimeout(); }
function stockpile($app, $user_id) { $s = new Cacher(new Tally($app, $user_id), cachemock()); $s->forceRefresh(TRUE); return $s; }