LinuxCommandLibrary

axi-cache

Cache AXI transactions to improve performance

SYNOPSIS

axi-cache <subcommand> [options] [arguments]

Common subcommands include:
axi-cache status
axi-cache clean [options]
axi-cache fetch <item>... [options]
axi-cache store <item>... [options]
axi-cache purge [options]
axi-cache pull [options]
axi-cache push [options]
axi-cache show [options]

PARAMETERS

status
    Displays the current state and statistics of the local cache.

clean
    Removes old or specified entries from the local cache.

fetch <item>...
    Retrieves specified items (e.g., source packages or compiled libraries) into the local cache.

store <item>...
    Adds specified items to the local cache, typically after they have been processed or compiled.

purge
    Completely empties the local cache.

pull
    Synchronizes the local cache with a remote cache, pulling new or updated items.

push
    Uploads local cache entries to a remote cache for sharing or backup.

show
    Lists contents of the cache.

-v, --verbose
    Enables verbose output, displaying detailed information about the cache operations.

-f, --force
    Forces an operation, potentially overwriting existing data or bypassing confirmation prompts.

-h, --help
    Displays a help message for the main command or a specific subcommand.

--cache-dir <path>
    Specifies an alternative directory to use for the cache instead of the default location.

--remote <url>
    Specifies the URL of a remote cache for synchronization (pull/push) operations.

--branch <name>
    Used with remote cache operations to specify a particular branch of cached items.

--all
    Applies the clean or purge operation to all relevant cache entries.

DESCRIPTION

axi-cache is a command-line utility integral to the Axiom-V build system, a modern re-implementation of the Axiom computer algebra system. Its primary function is to manage a local cache of source files and compiled artifacts (like .spad files and their compiled .NRLIB or .NRLIB.axml equivalents). By caching these components, axi-cache significantly accelerates repeated builds, reduces network traffic for fetching dependencies, and contributes to build reproducibility. It works in conjunction with other Axiom-V tools like axi-fetch (for retrieving dependencies) and axi-compile (for compiling sources). The cache helps maintain consistency across different development environments and ensures that builds leverage previously processed components efficiently.

CAVEATS

  • axi-cache is not a standard Linux distribution command. It is specific to the Axiom-V project and requires the Axiom-V development environment to be set up.
  • Its functionality and available options are determined by the specific version of Axiom-V being used.
  • Comprehensive documentation beyond the Axiom-V project's own resources may be limited.

ROLE IN AXIOM-V WORKFLOW

In a typical Axiom-V development cycle, axi-cache plays a crucial role alongside axi-fetch and axi-compile. Developers first use axi-fetch to retrieve necessary source packages, which may utilize the cache. During compilation with axi-compile, axi-cache stores the resulting compiled libraries (.NRLIB) and intermediate artifacts. Subsequent builds then consult the cache, avoiding redundant compilation steps and significantly reducing build times.

COMPARISON WITH CCACHE

While axi-cache shares a conceptual similarity with ccache (a compiler cache for C/C++/Objective-C), their implementations and scope differ. ccache primarily caches the output of C/C++ compilers based on source file hashes, while axi-cache is tailored specifically for the Axiom-V build system, caching Axiom-specific source files, compiled Lisp code, and NRLIB artifacts. axi-cache also often supports remote cache synchronization, a feature less common in standard ccache setups.

HISTORY

axi-cache emerged as part of the Axiom-V project, which began as a collaborative effort to modernize and continue the development of the Axiom computer algebra system. Recognizing the need for efficient and reproducible builds, especially given Axiom's complex dependency graph and compilation process (often involving Lisp and its own internal compiler), axi-cache was developed to manage a persistent cache of source files and compiled objects. Its inclusion streamlined the development workflow, enabling faster iterations for developers and facilitating continuous integration by leveraging previously built components. It represents a key infrastructure component in ensuring the ongoing usability and maintainability of the Axiom-V system.

SEE ALSO

axi-fetch(1), axi-compile(1), make(1), ccache(1)

Copied to clipboard