diff --git a/app/Http/routes.php b/app/Http/routes.php index 3bcc4d8c..5ecc4333 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -90,7 +90,7 @@ Route::group([ // summits Route::group(array('prefix' => 'summits'), function () { - Route::get('', 'OAuth2SummitApiController@getSummits'); + Route::get('', [ 'middleware' => 'cache:'.Config::get('cache_api_response.get_summits_response_lifetime', 600), 'uses' => 'OAuth2SummitApiController@getSummits']); Route::group(array('prefix' => '{id}'), function () { diff --git a/config/cache_api_response.php b/config/cache_api_response.php index 6413add6..7245796d 100644 --- a/config/cache_api_response.php +++ b/config/cache_api_response.php @@ -16,4 +16,5 @@ return [ 'get_summit_response_lifetime' => env('CACHE_API_RESPONSE_GET_SUMMIT_LIFETIME', 300), 'get_event_feedback_response_lifetime' => env('CACHE_API_RESPONSE_GET_EVENT_FEEDBACK_LIFETIME', 300), 'get_published_event_response_lifetime' => env('CACHE_API_RESPONSE_GET_PUBLISHED_EVENT_LIFETIME', 300), + 'get_summits_response_lifetime' => env('CACHE_API_RESPONSE_GET_SUMMITS_LIFETIME', 600), ]; \ No newline at end of file