HtmlCache

laravel php package open-source

This package speeds up your laravel application by caching the final rendered html. So your database queries and view loading algorithms don't need to run every single page load.


This package is made for you if you have a lot of static pages (or pages that don't change very often). That means portfolios, blogs, landing pages and more.


And it is highly customizable: You can even cache the same page for every user different, allowing that you can cache for example their account page or dashboard without worrying that another user can see these cached pages.


One benefit against much other html caches: It will also cache the pages based on language, and (optionally) user id. And if there are special cases (for example a special GET-parameter) that needs to be used to generate multiple versions of the same page, the middleware can be easily modified.

Why?

This package was originally created for this website (jkniest.de). Since the functionalities are also needed in other projects by me, they were extracted as a package.


Features

Language-based cache

When a page is cached, the language is observed so that each language has its own cached version. This can be seen, for example, on the jkniest.de site, since every project can be read in German and English.

User-based cache

Optionally, each page can also be cached for a specific user. Thus, it is possible to cache dashboard pages or profile pages that are only viewable for a single user.

Scalability

Thanks to a very simple internal API, the package can be expanded very easily. In the project there is, for example, a guide on how to make the package compatible with "Pagination".


Development

The package was developed with and for the Laravel framework. The source code is licensed under the MIT — so everyone can use and customize it for their own purposes. The source code is available on Github.

Project information
Created
2017
Framework
Laravel
Languages
PHP
License
MIT