Angular Modernizer
    Preparing search index...

    Function createToolCacheConfig

    • Create cache configuration for a specific tool.

      Generates the complete cache configuration object required by the Kernel, so scan-solid, scan-angular, scan-architecture and scan-all share the same size, age and version settings.

      Parameters

      • rootPath: string

        Project root path

      • toolName: "solid" | "angular" | "architecture" | "all"

        Tool-specific subdirectory ('solid', 'angular', 'architecture', 'all')

      Returns {
          cacheDir: string;
          compression: boolean;
          enabled: boolean;
          maxAge: number;
          maxSize: number;
          version: string;
      }

      Complete cache configuration ready for Kernel

      • cacheDir: string

        <rootPath>/.angular-modernizer-cache/<toolName>.

      • compression: boolean

        Always true.

      • enabled: boolean

        Always true.

      • maxAge: number

        Maximum entry age in milliseconds (CACHE_AGE.DEFAULT).

      • maxSize: number

        Maximum cache size in bytes (CACHE_SIZE.DEFAULT).

      • version: string

        Cache version; entries of another version are invalid.

      // In scan-solid.ts
      import { createToolCacheConfig } from '@angular-modernizer/core';

      const kernel = new Kernel({
      tsConfigPath,
      plugins: [new SolidPlugin()],
      cacheConfig: createToolCacheConfig(rootPath, 'solid'),
      });