aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Route
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-25 23:06:53 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-26 11:35:42 +0100
commitc1e4f9f30563d5eda1718d716d631d6092cd4e28 (patch)
tree3bb7b6ef891cd80895d4c2c92252a4ccbc0c0cee /lib/private/Route
parentfe7e726ab228e6ddde7cf1442de9d0db193334a1 (diff)
downloadnextcloud-server-c1e4f9f30563d5eda1718d716d631d6092cd4e28.tar.gz
nextcloud-server-c1e4f9f30563d5eda1718d716d631d6092cd4e28.zip
Use type casting instead of *val() method
It should be up to 6x faster Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/Route')
-rw-r--r--lib/private/Route/CachingRouter.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Route/CachingRouter.php b/lib/private/Route/CachingRouter.php
index 355f9e80c3f..cb1b98d77e6 100644
--- a/lib/private/Route/CachingRouter.php
+++ b/lib/private/Route/CachingRouter.php
@@ -52,7 +52,7 @@ class CachingRouter extends Router {
*/
public function generate($name, $parameters = array(), $absolute = false) {
asort($parameters);
- $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . intval($absolute);
+ $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . (int)$absolute;
$cachedKey = $this->cache->get($key);
if ($cachedKey) {
return $cachedKey;