public function getCacheFile(callable $encoder = null): string
    {
        if (\is_null($encoder)) {
            $encoder = function ($value): string {
                return var_export($value, true);
            };
        }

        $statics = $encoder($this->staticRoutes);
        $counts = $encoder($this->segmentCounts);
        $values = $encoder($this->segmentValues);
        $definitions = $encoder($this->routeDefinitions);
        $names = $encoder($this->routesByName);

        return <<<TEMPLATE
<?php return new class extends \Simply\Router\RouteDefinitionProvider {
    protected \$staticRoutes = $statics;
    protected \$segmentCounts = $counts;
    protected \$segmentValues = $values;
    protected \$routeDefinitions = $definitions;
    protected \$routesByName = $names;
};
TEMPLATE;
    }