Cache

Frontend cache is tagged with swayok/alternative-laravel-cache according to the following tree structure:

โ”œโ”€โ”€ data
โ”‚ โ”œโ”€โ”€ structure
โ”‚ โ”œโ”€โ”€ custom
โ”‚ โ”œโ”€โ”€ models
| | โ””โ”€โ”€ {modelName}
โ”‚ โ”œโ”€โ”€ routes
| | โ””โ”€โ”€ {routeId}
โ”‚ โ””โ”€โ”€ forms
| โ””โ”€โ”€ {formId}
โ””โ”€โ”€ img
note

When a parent tag is deleted all its children are deleted too.

Here is a breakdown of the various cache tags. For testing or other purposes you can manage these tags from the CLI, for instance to clear a particular tags' cache with php artisan cacher:clear {tag} e.g.:

php artisan cacher:clear models.product

data#

Applied to all the caches that contain data from standardised external sources, for instance the CMS api that feeds the routes and custom endpoints, the form manager, etc.

structure#

It tags the data related to the structure of the frontend, for instance the routes mapping and resolutions in their relation to frontend templates.

custom#

All data retrieved "manually" in the frontend application, for instance the data retrieved with explicit calls of the CmsApi::getData and CmsApi::postData methods.

models#

It tags all the caches produced by calls of the method CmsApi::getAllModels.

models.{modelName}#

It tags all the cache produced by calls of the method CmsApi::getAllModels that matches a specific modelName.

routes#

It tags all the route specific caches created automatically by the route's Base controller associated to each route.

routes.{routeId}#

It tags the route cache created automatically by the route's Base controller that matches a specific routeId (or template name or route's template, they are all the same frontend side).

forms#

It tags all the forms specific caches created either by the internal Form manager or an external one (like Olmoforms or Fillform).

forms.{formId}#

It tags the forms specific caches created either by the internal Form manager or an external one (like Olmoforms or Fillform) that matches a specific formId.

img#

Tag that identifies all images and their associated metadata produced by the frontend Image processor.