Faster ETag computation
This commit is contained in:
parent
04bdb04f20
commit
3010bd52f2
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ class NetworkingService
|
||||||
|
|
||||||
$secondsToLive = $daysToLive * 24 * 60 * 60;
|
$secondsToLive = $daysToLive * 24 * 60 * 60;
|
||||||
$lastModified = filemtime($fullPath);
|
$lastModified = filemtime($fullPath);
|
||||||
$eTag = md5(file_get_contents($fullPath)); //todo: faster
|
$eTag = md5($fullPath . $lastModified);
|
||||||
|
|
||||||
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])
|
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE'])
|
||||||
? $_SERVER['HTTP_IF_MODIFIED_SINCE']
|
? $_SERVER['HTTP_IF_MODIFIED_SINCE']
|
||||||
|
|
Loading…
Reference in a new issue