mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Change cache-busting query string format from ?YYYYMMDDHHMMSS to ?t=UnixTime
- 날짜, 유닉스 타임스탬프, 16진수(CKEditor) 등 여러 가지 포맷을 혼용하고 있던 캐시 방지용 쿼리스트링의 형태를 "유닉스 타임스탬프"로 통일 - 표준 시간대 처리 등 은근히 많은 자원을 소모하는 date() 함수를 사용하지 않음 - t=를 붙여서 정상적인 쿼리스트링 구조가 나오도록 하여, 웹방화벽이나 CDN 등에서 문제를 일으킬 가능성을 줄임 - 덤으로, 길이도 2바이트씩 짧아짐
This commit is contained in:
parent
68ee78f1f8
commit
c8638d2548
9 changed files with 20 additions and 20 deletions
|
|
@ -1109,7 +1109,7 @@ class MemberModel extends Member
|
|||
$info = new stdClass();
|
||||
$info->width = $width;
|
||||
$info->height = $height;
|
||||
$info->src = \RX_BASEURL . $image_name_file . '?' . date('YmdHis', filemtime(\RX_BASEDIR . $image_name_file));
|
||||
$info->src = \RX_BASEURL . $image_name_file . '?t=' . filemtime(\RX_BASEDIR . $image_name_file);
|
||||
$info->file = './'.$image_name_file;
|
||||
$GLOBALS['__member_info__']['profile_image'][$member_srl] = $info;
|
||||
break;
|
||||
|
|
@ -1142,7 +1142,7 @@ class MemberModel extends Member
|
|||
$info = new stdClass;
|
||||
$info->width = $width;
|
||||
$info->height = $height;
|
||||
$info->src = \RX_BASEURL . $image_name_file. '?' . date('YmdHis', filemtime(\RX_BASEDIR . $image_name_file));
|
||||
$info->src = \RX_BASEURL . $image_name_file. '?t=' . filemtime(\RX_BASEDIR . $image_name_file);
|
||||
$info->file = './'.$image_name_file;
|
||||
$GLOBALS['__member_info__']['image_name'][$member_srl] = $info;
|
||||
}
|
||||
|
|
@ -1176,7 +1176,7 @@ class MemberModel extends Member
|
|||
$info = new stdClass;
|
||||
$info->width = $width;
|
||||
$info->height = $height;
|
||||
$info->src = \RX_BASEURL . $image_mark_file . '?' . date('YmdHis', filemtime(\RX_BASEDIR . $image_mark_file));
|
||||
$info->src = \RX_BASEURL . $image_mark_file . '?t=' . filemtime(\RX_BASEDIR . $image_mark_file);
|
||||
$info->file = './'.$image_mark_file;
|
||||
$GLOBALS['__member_info__']['image_mark'][$member_srl] = $info;
|
||||
}
|
||||
|
|
@ -1232,7 +1232,7 @@ class MemberModel extends Member
|
|||
$localpath = str_replace('/./', '/', parse_url($info->src, PHP_URL_PATH));
|
||||
if(file_exists($_SERVER['DOCUMENT_ROOT'] . $localpath))
|
||||
{
|
||||
$info->src = $localpath . '?' . date('YmdHis', filemtime($_SERVER['DOCUMENT_ROOT'] . $localpath));
|
||||
$info->src = $localpath . '?t=' . filemtime($_SERVER['DOCUMENT_ROOT'] . $localpath);
|
||||
}
|
||||
}
|
||||
$GLOBALS['__member_info__']['group_image_mark'][$member_srl] = $info;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue