Content Cache

Swarm uses a content cache to store frequently accessed objects (primarily domains and buckets). These objects can be cached in RAM on the requested nodes, which boosts read throughput and response times for relatively small objects that are accessed frequently.

Important

To maintain performance, do not disable the content cache unless advised by Support, especially if you are writing named objects.

As object demand changes over time, Swarm automatically manages the cache to increase or decrease the number of cached copies throughout the cluster. For most objects, this prevents stale data from being returned in a query.

These cluster-wide parameters configure the cache:

  • cache.expirationTime

  • cache.maxCacheableSize

  • cache.percentage

  • cache.realmStaleTimeout

See the for configuring the content cache.

See Use the Content Cache in a Distributed System.

Response Headers for the Content Cache

The following response headers provide information about the content cache:

  • Age. Indicates the length of time (in seconds) the object was stored in the content cache.

    • If the Age header is absent, the object was retrieved from the drive.

    • If the Age header = 1, the object is cached on a node where it also resides on the drive. See RFC 7234 5.1.

  • Cache-Control: no-cache. Matches exactly what was sent with the object on WRITE.

  • Cache-Control: max-age. Matches exactly what was sent with the object on WRITE.

  • Cache-Control: no-cache-context. Matches exactly what was sent with the object on WRITE.

See .

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.