or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-3/

Workspace Cache Directory Manager

A utility for managing Nx workspace cache directory configuration and cached data.

Capabilities

Configure cache directory

  • Sets a custom cache directory for the workspace and returns the path @test
  • Handles both relative and absolute paths correctly @test

Configure cacheable outputs

  • Defines output patterns to be cached for a target @test
  • Adds multiple output patterns in a single operation @test

Clear workspace cache

  • Removes all cached build data from the cache directory @test
  • Reports the number of entries removed @test

Implementation

@generates

API

/**
 * Sets the workspace cache directory path
 * @param workspaceRoot - Root directory of the workspace
 * @param cacheDirectory - Path to the cache directory (relative or absolute)
 * @returns The configured cache directory path
 */
export function setCacheDirectory(workspaceRoot: string, cacheDirectory: string): string;

/**
 * Configures cacheable output patterns for a project target
 * @param workspaceRoot - Root directory of the workspace
 * @param projectName - Name of the project
 * @param targetName - Name of the target (e.g., 'build', 'test')
 * @param outputs - Array of output patterns to cache (e.g., ['{projectRoot}/dist'])
 */
export function setCacheableOutputs(
  workspaceRoot: string,
  projectName: string,
  targetName: string,
  outputs: string[]
): void;

/**
 * Clears all cached data from the workspace cache directory
 * @param workspaceRoot - Root directory of the workspace
 * @returns Number of cache entries cleared
 */
export function clearCache(workspaceRoot: string): number;

Dependencies { .dependencies }

nx { .dependency }

Provides workspace configuration and cache management capabilities.

@satisfied-by