Skip to content

Instantly share code, notes, and snippets.

@hmpmarketing
Last active January 5, 2018 18:58
Show Gist options
  • Save hmpmarketing/7bd801969e18933d0269112952ac1169 to your computer and use it in GitHub Desktop.
Save hmpmarketing/7bd801969e18933d0269112952ac1169 to your computer and use it in GitHub Desktop.
Cache.remember = function (key, lifetime, callback) {
memcached.get(key, function (err, data) {
if(data){
return data;
}
});
}
};
///Laravel
$value = Cache::remember('users', $minutes, function () {
return DB::table('users')->get();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment