Skip to content

Cache Generation Guide

Data Helpers uses a persistent cache to store metadata about your DTOs. This cache dramatically improves performance by eliminating reflection overhead on subsequent requests.

Terminal window
# Warm cache for all DTOs in a directory
php bin/warm-cache.php src/Dtos
# Warm cache for specific directory
php bin/warm-cache.php app/DataTransferObjects
# Using Taskfile
task dev:cache:warmup
Terminal window
# Clear all cache
php bin/clear-cache.php
# Using Taskfile
task dev:cache:clear

For production deployments with MANUAL cache invalidation mode:

deploy.sh
#!/bin/bash
# Clear old cache
php bin/clear-cache.php
# Warm cache for all DTOs
php bin/warm-cache.php src/Dtos
# Deploy application
# ...