original_string: public function fetch($id)
      {
          if (!file_exists($this->filename($id))) {
              return false;
          }
  
          $filedata = file_get_contents($this->filename($id));
          $data = json_decode($filedata, true);
          if ($data['ttl'] !== null) {
              if (($data['time'] + $data['ttl']) < time()) {
                  return false;
              }
          }
  
          return $data['data'];
      }
code: public function fetch($id)
      {
          if (!file_exists($this->filename($id))) {
              return false;
          }
  
          $filedata = file_get_contents($this->filename($id));
          $data = json_decode($filedata, true);
          if ($data['ttl'] !== null) {
              if (($data['time'] + $data['ttl']) < time()) {
                  return false;
              }
          }
  
          return $data['data'];
      }
code_tokens: public function fetch ( $ id ) { if ( ! file_exists ( $ this -> filename ( $ id ) ) ) { return false ; } $ filedata = file_get_contents ( $ this -> filename ( $ id ) ) ; $ data = json_decode ( $ filedata , true ) ; if ( $ data [ 'ttl' ] !== null ) { if ( ( $ data [ 'time' ] + $ data [ 'ttl' ] ) < time ( ) ) { return false ; } } return $ data [ 'data' ] ; }
docstring: Fetches an entry from the cache or returns false if not exists.
  
  @param string $id
  
  @return string|false
docstring_tokens: Fetches an entry from the cache or returns false if not exists .