mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
Advanced Search WIP: new mechanism for passing the dictionary to the client side. Hopefully faster than before thanks to the browser's cache.
SVN:b1162[5453]
This commit is contained in:
@@ -2528,6 +2528,15 @@ EOF
|
||||
$oPage->add(json_encode($aResult));
|
||||
break;
|
||||
|
||||
case 'dict':
|
||||
$sSignature = Utils::ReadParam('s', ''); // Sanitization prevents / and ..
|
||||
$oPage = new ajax_page(""); // New page to cleanup the no_cache done above
|
||||
$oPage->SetContentType('text/javascript');
|
||||
$oPage->add_header('Cache-control: public, max-age=86400'); // Cache for 24 hours
|
||||
$oPage->add_header("Pragma: cache"); // Reset the value set .... where ?
|
||||
$oPage->add(file_get_contents(Utils::GetCachePath().$sSignature.'.js'));
|
||||
break;
|
||||
|
||||
default:
|
||||
$oPage->p("Invalid query.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user