This is an MIT-licensed open source project with its ongoing development made possible by the support of the community. I created this package in response to a client project that had complex, nested forms with many <select>'s that resulted in over 700 database queries on one page. I needed a package that abstracted the caching process out of the model for me and one that would let me cache custom queries, as well as cache model relationships. This package is an attempt to address those requirements. For best performance, a taggable cache provider is recommended (redis, memcached). While this is optional, using a non-taggable cache provider will mean that the entire cache is cleared each time a model is created, saved, updated, or deleted. Keeping keys separate for multiple database connections is automatically handled. This is especially important for multi-tenant applications and of course, any application using multiple database connections.

Features

  • Automatic, self-invalidating relationship (only eager-loading) caching
  • Documentation available
  • Automatic, self-invalidating model query caching
  • Automatic use of cache tags for cache providers that support them
  • Requires PHP 7.3+
  • Requires Laravel 8.0+

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow Model Caching for Laravel

Model Caching for Laravel Web Site

Other Useful Business Software
The All-in-One Commerce Platform for Businesses - Shopify Icon
The All-in-One Commerce Platform for Businesses - Shopify

Shopify offers plans for anyone that wants to sell products online and build an ecommerce store, small to mid-sized businesses as well as enterprise

Shopify is a leading all-in-one commerce platform that enables businesses to start, build, and grow their online and physical stores. It offers tools to create customized websites, manage inventory, process payments, and sell across multiple channels including online, in-person, wholesale, and global markets. The platform includes integrated marketing tools, analytics, and customer engagement features to help merchants reach and retain customers. Shopify supports thousands of third-party apps and offers developer-friendly APIs for custom solutions. With world-class checkout technology, Shopify powers over 150 million high-intent shoppers worldwide. Its reliable, scalable infrastructure ensures fast performance and seamless operations at any business size.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Model Caching for Laravel!

Additional Project Details

Programming Language

PHP

Related Categories

PHP Frameworks

Registered

2024-04-09