Last active
          January 5, 2018 18:58 
        
      - 
      
- 
        Save hmpmarketing/7bd801969e18933d0269112952ac1169 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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