Learn about Route caching in Lumen

Route caching helps to speed things up. In Laravel 5, a caching mechanism was introduced to speed up the execution.

 

Lumen

In soda marketing terms, Lumen could be considered Laravel Light or Laravel Zero. In addition tousing the FastRoute routing package, many packages have been removed from Lumen, allowing it tobe minimal and reduce its footprint.

Comparison between Laravel and Lumen

The packages in Laravel and Lumen were compared and listed in the following table. These packages are installed when the following command is run:

$ composer update –-no-dev

The preceding command is used when the development is completed and the application is ready for deployment on the server. Tools such as PHPUnit and PHPSpec are obviously excluded at this stage.

The package names are aligned to illustrate where the packages are present in both Laravel andLumen:

Laravel Packages Lumen Packages
nikic/fast-route
illuminate/cache
illuminate/config illuminate/config
illuminate/console illuminate/console
illuminate/container illuminate/container
illuminate/contracts illuminate/contracts
illuminate/cookie illuminate/cookie
illuminate/database illuminate/database
illuminate/encryption illuminate/encryption
illuminate/events illuminate/events
illuminate/exception
illuminate/filesystem illuminate/filesystem
illuminate/foundation
illuminate/hashing illuminate/hashing
illuminate/http illuminate/http
illuminate/log
illuminate/mail
illuminate/pagination illuminate/pagination
illuminate/pipeline
illuminate/queue illuminate/queue
illuminate/redis
illuminate/routing
illuminate/session illuminate/session
illuminate/support illuminate/support
illuminate/translation illuminate/translation
illuminate/validation illuminate/validation
illuminate/view illuminate/view
jeremeamia/superclosure
league/flysystem
monolog/monolog monolog/monolog
mtdowling/cron-expression mtdowling/cron-expression
nesbot/carbon
psy/psysh
swiftmailer/swiftmailer
symfony/console
symfony/css-selector
symfony/debug
symfony/dom-crawler
symfony/finder
symfony/http-foundation symfony/http-foundation
symfony/http-kernel symfony/http-kernel
symfony/process
symfony/routing
symfony/security-core symfony/security-core
symfony/var-dumper symfony/var-dumper
vlucas/phpdotenv
classpreloader/classpreloader
danielstjules/stringy
doctrine/inflector
ext-mbstring
ext-mcrypt

At the time of writing, there are 51 packages (shown in the left column) that are installed in Laravel 5.0 using the nondevelopment configuration. Compare this number of packages to the number of packages installed in Lumen (shown in the right column)—there are just 24.

The aforementioned nikic/fast-route package is the only package that Lumen has which Laravel does not. The symfony/routing package is the complimentary package found in Laravel.

About the author

Deven Rathore

I'm Deven Rathore, a multidisciplinary & self-taught designer with 3 years of experience. I'm passionate about technology, music, coffee, traveling and everything visually stimulating. Constantly learning and experiencing new things.

Pin It on Pinterest

Shares