code: public <T> T get(String name, Closure<String,T> closure){
          T obj = null;
          lock(name);
          try {
              obj = (T)cache.get(name);
              if(obj!=null){
                  if(ttl>0 && (created.get(name)+tu.toMillis(ttl)<System.currentTimeMillis())){
                      //invalidate
                      obj = null;
                  }
              }
              if(obj!=null){
                  gets.put(name, gets.get(name) + 1);
                  return obj;
              }
          } finally {
              unlock(name);
          }
  
          //add obj
          obj = closure.call(name);
  
          lock(name);
          try {
  
              created.put(name,System.currentTimeMillis());
              gets.put(name, 1L);
              cache.put(name, obj);
  
          } finally {
              unlock(name);
          }
          checkSize();
          return obj;
      }
docs: Get record from cache
  
  @param name record name
  @param closure if record not present initialize it with closure
  @param <T> type of record
  @return record