Skip to content

Commit

Permalink
Merge pull request #385 from dzaikos/cache-image-size-2
Browse files Browse the repository at this point in the history
Cache image size (take 2)
Andrew Dolgov committed Jun 27, 2014
2 parents c6f9438 + a3d5018 commit c7a0cb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/rssfuncs.php
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
define_default('DAEMON_UPDATE_LOGIN_LIMIT', 30);
define_default('DAEMON_FEED_LIMIT', 500);
define_default('DAEMON_SLEEP_INTERVAL', 120);
define_default('_MIN_CACHE_IMAGE_SIZE', 1024);

function update_feedbrowser_cache() {

@@ -1173,7 +1174,7 @@ function cache_images($html, $site_url, $debug) {
if (!file_exists($local_filename)) {
$file_content = fetch_file_contents($src);

if ($file_content && strlen($file_content) > 1024) {
if ($file_content && strlen($file_content) > _MIN_CACHE_IMAGE_SIZE) {
file_put_contents($local_filename, $file_content);
}
}

0 comments on commit c7a0cb7

Please sign in to comment.