oxhq/cachelet-query
Cachelet Query is a Laravel package for fluent, cache-aware database queries, letting you cache expensive query results with automatic invalidation and tags while keeping Eloquent-style syntax simple and readable.
v0.1.0 is the first public release, and the release notes are deliberately thin — they tell you the package is a read-only split published from the main Cachelet monorepo (https://github.com/oxhq/cachelet). That single fact should shape your first hour with it:
oxhq/cachelet. Start at the monorepo README and any docs/ folder there.oxhq; confirm the exact package name before running composer require). Pin it explicitly — see Gotchas on pre-1.0 versioning.php artisan about / vendor/oxhq/ for a config/ directory, and try php artisan vendor:publish --provider="Oxhq\...\...ServiceProvider" (get the exact FQCN from the package's composer.json extra.laravel.providers block rather than guessing).config/cache.php default) and that your store supports whatever features the package advertises.First use case: take one read-heavy, low-volatility query in your app — a settings lookup, a category tree, a "featured products" list — and route it through the package rather than reaching for Cache::remember() by hand. That's the smallest change that proves the integration end-to-end (key generation, serialization, TTL, invalidation) without committing your architecture to it.
Because v0.1.0 ships no documented API surface in the release notes, treat the patterns below as the integration checklist to map onto whatever the package actually exposes:
CacheletQuery-backed trait on the model) and call it from controllers/jobs. If the package's API shifts in v0.2, you change one file instead of forty.$appends). Prefer caching arrays/collections from ->get()->toArray() or a DTO unless the package explicitly handles model hydration and versioning.saved/deleted events to bust relevant keys. If the package offers tag-like grouping (driver-dependent — see Gotchas), key off a domain concept (products, tenant:42) rather than raw SQL hashes.forever-style option only for data you can deterministically invalidate.CACHE_STORE=array so each test starts cold and assertions reflect real query behavior; add one integration test against your production store (Redis/Memcached) for the invalidation path, since that's where driver semantics differ.0.x releases are allowed to break on minor bumps. Pin with a tight constraint ("^0.1" is fine; "*" or "dev-main" is not) and read the monorepo changelog before every update. Budget for the v1.0 migration.file and database stores — BadMethodCallException at runtime, usually only in production because dev used array. Confirm driver support up front and mirror prod's store in staging.DB::afterCommit or an event listener), not inside it — otherwise a rollback leaves you with a busted cache and no data change.Cache::lock around regeneration if the package doesn't handle this for you.How can I help you explore Laravel packages today?