public function isListedInCache($lookup_hash)
  {
    // by default no match in cache
    $matched_listnames=null;
    
    $hex_lookup_hash=bin2hex($lookup_hash);
    
    foreach($this->getLists() as $listname => $liststate){
      $listdir=$this->getListStorageDir($listname);
      if(!is_dir($listdir)){
        $this->debugLog('isListedInCache() no list directory found for list '.$listname);
        continue;
      }
      if(!is_file($listdir.$this->fullhash_cache_filename)){
        //$this->debugLog('isListedInCache() no fullcache file found for list '.$listname);
        // no cache file, nothing to look up
        continue;
      }
      $cached_hashes=explode("\n",file_get_contents($listdir.$this->fullhash_cache_filename));
      foreach($cached_hashes as $cache_entry){
        $cache_parts=explode(';',$cache_entry);
        // 0:prefix;1:fullhash;2:expire_timestamp
        if($cache_parts[0]===substr($hex_lookup_hash,0,strlen($cache_parts[0]))){
          // ok prefix hash match 
          if(is_null($matched_listnames)){
            $matched_listnames=array();
          }
          // test against full hash
          if($cache_parts[1]===$hex_lookup_hash){
            // full hash match
            if($cache_parts[2]<time()){
              // expired full match must result in cache-miss so it gets re-fetched
              return null;
            }
            $matched_listnames[]=$listname;
            // we can skip to the next list
            continue(2);
          }
        }
      }
    }
    
    if(is_null($matched_listnames)){
      // we still have a complete cache miss, as a last resort
      // check if the prefix is in the negative cache file
      if(is_file($this->storage_dir.$this->fullhash_cache_filename)){
        // negative cache file
        $negative_prefixes=explode("\n",file_get_contents($this->storage_dir.$this->fullhash_cache_filename));
        foreach($negative_prefixes as $cache_entry){
          $cache_parts=explode(';',$cache_entry);
          // 0:prefix;1:expire_timestamp
          if($cache_parts[0]===substr($hex_lookup_hash,0,strlen($cache_parts[0]))){
            // ok prefix hash match 
            if(is_null($matched_listnames)){
              $matched_listnames=array();
            }
            if($cache_parts[1]<time()){
              // expired prefix match must result in cache-miss so it gets re-fetched
              return null;
            }
          }
        }
      }
      
    }
    
    return $matched_listnames;
  }