cache-fs template configuration

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
ft:sourceType
Paligo

If you choose to use the cache-fs template, your binarystore.xml configuration file should look like this:

<config version="v1">
        <chain template="cache-fs"/>
</config>

What's in the template?

While you don't need to configure anything else in your binarystore.xml, this is what the cache-fs template looks like under the hood.

<chain> <!-- template="cache-fs" -->
    <provider id="cache-fs" type="cache-fs">
        <provider id="file-system" type="file-system"/>
    </provider>
</chain>

This example sets the cache-fs size to be 10GB and its location (absolute path since it starts with a "/") to be /cache/filestore.

<config version="v1">
        <chain template="cache-fs"/>
        <provider id="cache-fs" type="cache-fs">
                <cacheProviderDir>/cache/filestore</cacheProviderDir>
                <maxCacheSize>10000000000</maxCacheSize>
        </provider>
</config>

Where:

Parameter

Description

type

cache-fs

maxCacheSize

The maximum storage allocated for the cache in bytes. Please note that maxCacheSize does not include files that are in progress of being uploaded (which is saved under cache/_pre); thus it is recommended to keep extra spaces for _pre folder.

Default: 5000000000 (5GB)

cacheProviderDir

The root folder of binaries for the filestore cache. If the value specified starts with a forward slash (“/”) it is considered the fully qualified path to the filestore folder. Otherwise, it is considered relative to the baseDataDir.

Default: cache

maxFileSizeLimit

The maximum limit in bytes for a binary to be saved in the cache-fs layer. For example, if maxFileSizeLimit = 1000000000 (1GB), then any binary bigger than 1GB will not be saved in the cache-fs.

Default: None (no limit).

Available from Artifactory version 7.71.1.

skipDuringUpload

If this flag is set to true, binaries will not be saved in the cache-fs during upload requests but rather only when downloading a binary.

Default: false (binaries can be added during both download and upload requests)

Available from Artifactory version 7.71.1.

multiReadEnabled

Default: true

When true, optimizes the download of binaries by allowing multiple simultaneous requests for the same binary to be fulfilled from a single fetch operation, which reduces the load on the underlying storage.

validateChecksum

Default: true

When true, validates the checksum of the binary before moving the binary to the cache-fs folder.

Example: NFS filestore with caching

The following example shows how you can configure an NFS filestore with caching.

<config version="v1">
  <chain>
    <provider id="cache-fs" type="cache-fs">
        <provider id="file-system" type="file-system"/>
    </provider>
  </chain>
  <provider id="cache-fs" type="cache-fs">
    <cacheProviderDir>/path/to/cache/dir</cacheProviderDir>
    <maxCacheSize>100000000000</maxCacheSize>
  </provider>
  <provider id="file-system" type="file-system">
    <fileStoreDir>/path/to/filestore/dir</fileStoreDir>
  </provider>
</config>

Ensure that you create the folders in the configuration before you start Artifactory.