Dependicus API Reference
    Preparing search index...

    Class CacheService

    Index

    Constructors

    Methods

    • Check if cached data is valid (exists and matches current hash of the invalidation file).

      Parameters

      • key: string

        Cache key (e.g., 'pnpm-list')

      • invalidationFile: string

        File path whose hash determines cache validity (e.g., lockfile path)

      Returns Promise<boolean>

    • Read cached data for a given key.

      Parameters

      • key: string

        Cache key

      Returns Promise<string>

    • Read permanent cache if it exists.

      Parameters

      • key: string

        Cache key

      Returns Promise<string | undefined>

    • Write data to cache along with hash of the invalidation file.

      Parameters

      • key: string

        Cache key

      • data: string

        Data to cache

      • invalidationFile: string

        File path whose hash determines cache validity

      Returns Promise<void>

    • Write data to cache without invalidation file (cache permanently).

      Parameters

      • key: string

        Cache key

      • data: string

        Data to cache

      Returns Promise<void>