Skip to content

HTML Cache

This page is generated from public package documentation in capell-4/packages and the package manifest checked into the source repository.

FieldValue
Composer packagecapell-app/html-cache
Package slughtml-cache
Product groupCapell Foundation
Tierfree
Bundlefoundation
Runtime contextsadmin, frontend
Capell version^4.0
Source repositorycapell-app/packages
Source pathpackages/html-cache
Docs sourcepackages/html-cache/docs
Manifestcapell.json

Static HTML cache, dependency indexing, and cache administration for Capell.

  • Package: capell-app/html-cache
  • Namespace: Capell\HtmlCache\
  • Surfaces: Filament admin, Livewire, console, queue, database
  • Service providers: packages/html-cache/src/Providers/HtmlCacheServiceProvider.php
  • Capell dependencies: capell-app/admin, capell-app/core, capell-app/frontend
  • Third-party dependencies: laravel/framework, lorisleiva/laravel-actions, spatie/laravel-data, spatie/laravel-package-tools
  • Adds static HTML cache indexing, dependency tracking, and admin cache controls for Capell public pages.
  • Helps operators see stale cached URLs and refresh affected pages without manually clearing broad caches.
  • Protects public-output safety by keeping cached HTML suitable for anonymous visitors, admins, crawlers, and static exports.
  • Static HTML cache, dependency indexing, and cache administration for Capell.
  • Admin resources: CachedModelUrlResource.
  • Admin page: MaintenanceCachePage.
  • Dashboard widgets for cache overview, cache coverage, and stale regeneration queue.
  • Livewire components: SiteHealthCacheMap.
  • Package setup or maintenance commands.
AreaPathPurpose
Actionspackages/html-cache/src/ActionsDomain operations. Test these directly where possible.
Datapackages/html-cache/src/DataStructured payloads, form state, view models, and integration data.
Enumspackages/html-cache/src/EnumsPersisted states and Filament option values.
Modelspackages/html-cache/src/ModelsEloquent records owned by the package.
Filamentpackages/html-cache/src/FilamentAdmin resources, pages, widgets, and settings UI.
Livewirepackages/html-cache/src/LivewireInteractive frontend or admin components.
HTTPpackages/html-cache/src/HttpControllers, middleware, and request handling.
Jobspackages/html-cache/src/JobsQueued work and async side effects.
Providerspackages/html-cache/src/ProvidersRegistration, extension hooks, routes, migrations, and resources.
Resourcespackages/html-cache/resourcesViews, translations, assets, and package resources.
Configpackages/html-cache/configPackage configuration and publishable config.
Databasepackages/html-cache/databaseMigrations, seeders, and settings migrations.
Testspackages/html-cache/testsPackage-level Pest coverage.
  • Resources: CachedModelUrlResource.
  • Pages: MaintenanceCachePage, ListCachedModelUrls.
  • Widgets: HtmlCacheOverviewWidget, CacheCoverageUrlsWidget, HtmlCacheStaleQueueWidget.
  • Extenders: page table cache indicator, site header maintenance/cache action, Site Health cache map.
  • Livewire: SiteHealthCacheMap.
  • Jobs: RegisterCachedModelUrlsJob.
  • Integration: registers StaticMaintenancePageStore so Capell frontend maintenance pages can use the page_cache disk when this package is installed.
  • capell:static-site {--site=} {--internal : Render URLs through the current Laravel kernel} {--refresh : Delete affected HTML cache files before rendering} (packages/html-cache/src/Console/Commands/StaticSiteCommand.php)

Capell frontend owns maintenance page rendering, the manifest, and the runtime middleware. This package only contributes the page_cache-backed static store plus optional admin actions for generating those files.

Generated files are written under maintenance/ on the page_cache disk. The manifest at storage/framework/capell-maintenance.json maps host/scheme/path combinations to those files. To serve static maintenance HTML during Laravel maintenance mode, wire the frontend frontend.maintenance middleware into the host application’s maintenance path. If this package is not installed, no static store is registered and frontend falls back to Laravel’s plain 503.

  • Models: CachedModelUrl.
  • Migrations: 2026_05_10_190854_01_create_cached_model_urls_table.php.
  • Config: packages/html-cache/config/capell-html-cache.php.
  • Data objects live in src/Data/; use them for payloads, form state, and view models.
  • Contracts: PageCacheNotifiable.
  • Register Capell extension points, routes, migrations, settings, render hooks, and resources from service providers.
  • Install with composer require capell-app/html-cache in the host Capell application.
  • Run migrations through the host application package install flow.
  • In this repository, verify package changes with vendor/bin/pest; do not use php artisan.

Run package tests from the repository root:

Terminal window
vendor/bin/pest packages/html-cache/tests --configuration=phpunit.xml
  • Cached HTML must be safe for anonymous visitors, signed-in users, admins, crawlers, and static exports.
  • Put behaviour changes in src/Actions/; UI classes, commands, and controllers should call actions instead of owning domain logic.
  • Use package Data classes at boundaries instead of passing anonymous arrays between layers.
  • Use backed enums for persisted values and enum labels for Filament options.