stasis-proxy - v0.1.0
    Preparing search index...

    Class CacheStore

    SQLite-backed cache store for LLM responses.

    Index

    Constructors

    Methods

    Constructors

    • Creates a new CacheStore instance.

      Parameters

      • dbPath: string = './stasis-cache.db'

        Path to the SQLite database file (default: ./stasis-cache.db)

      Returns CacheStore

    Methods

    • Retrieves a cached entry by its hash key.

      Parameters

      • key: string

        The SHA-256 hash key

      Returns CacheEntry | null

      The cached entry, or null if not found

    • Deletes a cache entry by its key.

      Parameters

      • key: string

        The SHA-256 hash key

      Returns boolean

      True if an entry was deleted, false otherwise

    • Clears all entries from the cache.

      Returns number

      The number of entries deleted