mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 08:25:55 +00:00
retire MIN_CACHE_FILE_SIZE
This commit is contained in:
@@ -67,7 +67,7 @@ class Af_Zz_ImgProxy extends Plugin {
|
||||
|
||||
$disable_cache = $this->host->get($this, "disable_cache");
|
||||
|
||||
if (!$disable_cache && strlen($data) > MIN_CACHE_FILE_SIZE) {
|
||||
if (!$disable_cache) {
|
||||
if ($this->cache->put($local_filename, $data)) {
|
||||
header("Location: " . $this->cache->getUrl($local_filename));
|
||||
return;
|
||||
|
||||
@@ -141,13 +141,9 @@ class Cache_Starred_Images extends Plugin {
|
||||
|
||||
$data = fetch_file_contents(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]);
|
||||
|
||||
if ($data) {
|
||||
if (strlen($data) > MIN_CACHE_FILE_SIZE) {
|
||||
$this->cache->put($local_filename, $data);
|
||||
}
|
||||
if ($data)
|
||||
return $this->cache->put($local_filename, $data);;
|
||||
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
//Debug::log("cache_images: local file exists for $url", Debug::$LOG_VERBOSE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user