Posts tagged with caching

Join 9,500+ smart developers

Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Caching Strategies In Laravel

tighten.com - submitted by Jamison Valenta

When it comes to caching, we have to balance performance gains with increased cost of complexity and infrastructure. In our latest post, we talk through a few different caching strategies and approaches so you know the best caching tool for any situation.

Read more [tighten.com]

Caching the entire response of a Laravel app original

by Freek Van der Herten – 5 minute read

When a request comes in your app will return a response. To create that response, your application has to do some work. Most likely queries will execute. This all takes some time. Wouldn't it be nice if the same request comes in, we can return the response the application has constructed previously?

Read more

Make your app fly with PHP OPcache

Recently this button to optimize PHP's OPcache was added to Laravel Forge.

If you were wondering what PHP OPcache is all about and what pressing this button does with your application, read this article Olav van Schie wrote on the subject a while ago.

Every time you execute a PHP script, the script needs to be compiled to byte code. OPcache leverages a cache for this bytecode, so the next time the same script is requested, it doesn’t have to recompile it. This can save some precious execution time, and thus make your app faster (and maybe save some server costs).

https://medium.com/appstract/make-your-laravel-app-fly-with-php-opcache-9948db2a5f93

Read more

Environment variables, config caching, and Laravel

In a short blogpost Michael Dyrynda gives some good advice on why you should cache your routes and config values.

As part of the recommended production deploy process it is important to run the caching commands that Laravel affords us via Artisan. This means running config:cache and route:cache, which will compile the config and route files down into a single file each.

In doing so, Laravel aims to speed up parsing of these files by only needing to read a single, rather than multiple files.

https://dyrynda.com.au/blog/environment-variables-config-caching-and-laravel

Read more

Getting started with Varnish Cache

If you want to learn Varnish Thijs Feryn wrote a book for you. It's free to download until 7th March 2017.

Getting Strated with Varnish Cache is a technical book about the Varnish caching technology. Varnish is a so-called reverse caching proxy that acts as an intermediary between the browser and the webserver. Varnish stores HTTP responses and serves them to the browser, without accessing the backend for every request. This causes a massive speed increase.

https://blog.feryn.eu/my-varnish-book-is-now-available/

Read more

Using Varnish on a Laravel Forge provisioned server original

by Freek Van der Herten – 12 minute read

For a project we're working on at Spatie we're expecting high traffic. That's why we spent some time researching how to improve the request speed of a Laravel application and the amount of requests a single server can handle. There are many strategies and services you can use to speed up a site. In…

Read more

Varnish explained

Varnish is a piece of software that, amongst other things, can make your website much faster. In a new post on his blog, Mattias Geniar tells you all about it.

Varnish can do a lot of things, but it's mostly known as a reverse HTTP proxy. It brands itself as an HTTP accelerator, making HTTP requests faster by caching them. ... Varnish is usually associated with performance, but it greatly increases your options to scale your infrastructure (load balancing, failover backends etc) and adds a security layer right out of the box: you can easily let Varnish protect you from the httpoxy vulnerability or slowloris type attacks.

https://ma.ttias.be/varnish-explained/

Be sure to watch Mattias' excellent talk he gave at this years Laracon:

Read more