mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-04 01:55:21 +02:00
[core] Returning 304 http code when returning cached data (#793)
This commit is contained in:
parent
059656c370
commit
422c125d8e
3 changed files with 33 additions and 0 deletions
|
@ -195,6 +195,7 @@ try {
|
|||
try {
|
||||
$bridge->setCache($cache);
|
||||
$bridge->setCacheTimeout($cache_timeout);
|
||||
$bridge->dieIfNotModified();
|
||||
$bridge->setDatas($params);
|
||||
} catch(Error $e) {
|
||||
http_response_code($e->getCode());
|
||||
|
@ -211,6 +212,7 @@ try {
|
|||
$format = Format::create($format);
|
||||
$format->setItems($bridge->getItems());
|
||||
$format->setExtraInfos($bridge->getExtraInfos());
|
||||
$format->setLastModified($bridge->getCacheTime());
|
||||
$format->display();
|
||||
} catch(Error $e) {
|
||||
http_response_code($e->getCode());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue