mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 10:05:56 +00:00
tunables:
* add CACHE_MAX_DAYS as a tunable generic expiry interval for various cached files * add some comments to tunables in functions.php * rename _MIN_CACHE_FILE_SIZE to MIN_CACHE_FILE_SIZE * respect MIN_CACHE_FILE_SIZE setting in a few more places where content is cached
This commit is contained in:
@@ -69,7 +69,7 @@ class Af_Zz_ImgProxy extends Plugin {
|
||||
|
||||
$disable_cache = $this->host->get($this, "disable_cache");
|
||||
|
||||
if (!$disable_cache) {
|
||||
if (!$disable_cache && strlen($data) > MIN_CACHE_FILE_SIZE) {
|
||||
if (file_put_contents($local_filename, $data)) {
|
||||
$mimetype = mime_content_type($local_filename);
|
||||
header("Content-type: $mimetype");
|
||||
|
||||
@@ -209,7 +209,7 @@ class Cache_Starred_Images extends Plugin implements IHandler {
|
||||
if (!file_exists($local_filename)) {
|
||||
$file_content = fetch_file_contents($src);
|
||||
|
||||
if ($file_content && strlen($file_content) > 0) {
|
||||
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
|
||||
file_put_contents($local_filename, $file_content);
|
||||
$success = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user