From 0f86e59db68509587a20908ef8b114a6f67afcf0 Mon Sep 17 00:00:00 2001 From: TSUYUSATO Kitsune Date: Wed, 10 Feb 2016 02:11:05 +0900 Subject: [PATCH] Cache Context#params result --- src/kemal/context.cr | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/kemal/context.cr b/src/kemal/context.cr index 076eafa..639ecdb 100644 --- a/src/kemal/context.cr +++ b/src/kemal/context.cr @@ -2,10 +2,8 @@ # information such as params, content_type e.g class HTTP::Server class Context - getter params - def params - Kemal::ParamParser.new(@route, @request).parse + @params ||= Kemal::ParamParser.new(@route, @request).parse end def redirect(url, status_code = 302)