Skip to content

Commit

Permalink
Merge remote-tracking branch 'simensen/url-cache'
Browse files Browse the repository at this point in the history
  • Loading branch information
elazar committed Dec 20, 2012
2 parents 57f6c49 + c99f218 commit c4d53a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Phergie/Plugin/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ protected function checkUrlCache($url, $shortenedUrl)
* cache; if expire is disabled, check if the URL is listed
*/
if ($expire > 0
&& isset($cache['url'][$source], $cache['shortened'][$source])
&& isset($cache['url'][$source][$url], $cache['shortened'][$source][$shortenedUrl])
) {
unset($cache, $url, $shortenedUrl, $expire);
return true;
Expand All @@ -383,6 +383,9 @@ protected function updateUrlCache($url, $shortenedUrl)
$cache = array();
$source = $this->getEvent()->getSource();

$cache['urlCache'] = $this->cache->fetch('urlCache');
$cache['shortCache'] = $this->cache->fetch('shortCache');

/**
* Transform URL (+shortened) into HEX CRC32 checksum to prevent
* problems and minimize cache size for less bloat
Expand Down

0 comments on commit c4d53a4

Please sign in to comment.