From b9ea2547bfcfc4933585bae3892b60ee86d7d0e3 Mon Sep 17 00:00:00 2001 From: spotweb Date: Sun, 20 Oct 2013 15:41:45 +0200 Subject: [PATCH] Show the new cache id we are using --- check-cache.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/check-cache.php b/check-cache.php index 06d5ca540..1eeac80cd 100644 --- a/check-cache.php +++ b/check-cache.php @@ -66,15 +66,18 @@ try { $cacheDao->getCacheContent($cacheItem['id'], $cacheItem['cachetype'], $cacheItem['metadata']); } catch(CacheIsCorruptException $x) { - echo PHP_EOL . ' Trying to fetch #' . $cacheItem['id'] . ' for ' . $cacheItem['resourceid'] . ' again' . PHP_EOL; + echo PHP_EOL . ' Trying to fetch #' . $cacheItem['id'] . ' for ' . $cacheItem['resourceid'] . ' again, '; switch($cacheItem['cachetype']) { case Dao_Cache::SpotNzb : { try { $fullSpot = $svcFullSpot->fetchFullSpot($cacheItem['resourceid'], 1); $svcNzb->fetchNzb($fullSpot); + + $cacheInfo = $cacheDao->getCachedNzb($cacheItem['resourceid']); + echo 'retrieved NZB as ' . $cacheInfo['id'] . PHP_EOL; } catch(Exception $x) { - echo PHP_EOL . ' Error redownload NZB: '. $x->getMessage() . PHP_EOL; + echo 'error redownloading NZB: '. $x->getMessage() . PHP_EOL; } # catch break; @@ -84,8 +87,11 @@ try { $fullSpot = $svcFullSpot->fetchFullSpot($cacheItem['resourceid'], 1); $svcImage->fetchSpotImage($fullSpot); + + $cacheInfo = $cacheDao->getCachedSpotImage($cacheItem['resourceid']); + echo 'retrieved image as ' . $cacheInfo['id'] . PHP_EOL; } catch(Exception $x) { - echo PHP_EOL . ' Error redownload image: '. $x->getMessage() . PHP_EOL; + echo 'error redownloading image: '. $x->getMessage() . PHP_EOL; } # catch break;