original_string: public function set($key, $data, $ttl = null)
      {
          if ($ttl) {
              $now = new \DateTime('now', new \DateTimeZone('UTC'));
              $expire = (int) $now->format('U') + $ttl;
          } else {
              $expire = 0;
          }
  
          $entry = array(
              'expire' => $expire,
              'value' => $data
          );
  
          $this->storage[$key] = $entry;
  
          return true;
      }
code: public function set($key, $data, $ttl = null)
      {
          if ($ttl) {
              $now = new \DateTime('now', new \DateTimeZone('UTC'));
              $expire = (int) $now->format('U') + $ttl;
          } else {
              $expire = 0;
          }
  
          $entry = array(
              'expire' => $expire,
              'value' => $data
          );
  
          $this->storage[$key] = $entry;
  
          return true;
      }
code_tokens: public function set ( $ key , $ data , $ ttl = null ) { if ( $ ttl ) { $ now = new \ DateTime ( 'now' , new \ DateTimeZone ( 'UTC' ) ) ; $ expire = ( int ) $ now -> format ( 'U' ) + $ ttl ; } else { $ expire = 0 ; } $ entry = array ( 'expire' => $ expire , 'value' => $ data ) ; $ this -> storage [ $ key ] = $ entry ; return true ; }
docstring: Set data to cache storage
  
  @param string $key
  @param mixed  $data
  @param int    $ttl
  
  @return bool
docstring_tokens: Set data to cache storage