Download the PHP package webo3/laravel-db-cache without Composer

On this page you can find all versions of the php package webo3/laravel-db-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-db-cache

Laravel DB Cache

Transparent database query caching for Laravel — zero code changes, smart invalidation, multi-driver.

The package intercepts queries at the connection level: SELECT results are cached, and any mutation (INSERT, UPDATE, DELETE, …) automatically invalidates the cached queries that reference the same tables. Your application code doesn't change.

Features

Requirements

PHP 8.1+ · Laravel 9–12 · MySQL, PostgreSQL or SQLite · Redis (optional, for the redis driver)

Installation

The service provider is auto-discovered. Optionally publish the config:

Quick start

Add to your .env:

That's it — SELECTs on your default mysql connection are now cached for the duration of each request. For a persistent cache shared across workers, switch to the Redis driver.

Configuration

Variable Default Description
DB_QUERY_CACHE_ENABLED false Enable/disable query caching
DB_QUERY_CACHE_DRIVER array Cache driver: array, redis, or null
DB_QUERY_CACHE_TTL 180 Cache time-to-live in seconds
DB_QUERY_CACHE_CONNECTION mysql Connection name(s) to cache (comma-separated for several)
DB_QUERY_CACHE_EXCLUDED_TABLES (empty) Identifiers (views, etc.) that must never be cached
DB_QUERY_CACHE_LOG_ENABLED false Cache hit/miss/invalidation logging + stats middleware
DB_QUERY_CACHE_TENANT_REQUIRED false Bypass caching until setTenantContext() is called (multi-tenant fail-safe)

The full reference (Redis connection, size limits, runtime API) lives in docs/configuration.md.

Artisan commands

Good to know

Details in docs/how-it-works.md.

Documentation

Guide Contents
Configuration Full config reference, drivers, multiple connections, excluded views, long-running workers (Octane/Horizon)
Redis driver Connection setup, TLS/ElastiCache, predis vs phpredis, igbinary, pruning, cluster caveat
Multi-tenancy Tenant-scoped caching, per-driver behavior, the tenant_required fail-safe
Usage & monitoring Programmatic API, stats middleware, artisan commands, custom drivers
How it works Caching pipeline, query normalization, consistency model and caveats

Testing

Tests need a MySQL connection (copy .env.example to .env); Redis tests skip automatically when Redis is unavailable.

License

MIT


All versions of laravel-db-cache with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/database Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package webo3/laravel-db-cache contains the following files

Loading the files please wait ...