diff options
author | Max Kostikov <max@kostikov.co> | 2020-09-09 11:11:52 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2020-09-09 11:11:52 +0200 |
commit | df758f40efdeb271d1e9086644ffba6b8fd10055 (patch) | |
tree | 002c74d07712ba108a6425b662aa2e9bff7ad8c2 | |
parent | 1d8dd949dcc07312cd741d517f6d852fc8def60a (diff) | |
download | volse-hubzilla-df758f40efdeb271d1e9086644ffba6b8fd10055.tar.gz volse-hubzilla-df758f40efdeb271d1e9086644ffba6b8fd10055.tar.bz2 volse-hubzilla-df758f40efdeb271d1e9086644ffba6b8fd10055.zip |
Avoid photo profile fetching more than once every 1 min
-rw-r--r-- | include/photo/photo_driver.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 495008a22..79d4e10bf 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -238,6 +238,8 @@ function import_xchan_photo($photo, $xchan, $thing = false, $force = false) { if(array_key_exists('expires', $hdrs)) $expires = strtotime($hdrs['expires']); + if($expires - 60 < time()) + $expires = time() + 60; else { $cc = ''; if(array_key_exists('cache-control', $hdrs)) |