CacheContentService

CacheContentService

available with version 3.18.0 or newer

The cache content service is designed to cache file content as temporary files under certain conditions.

Type local (default)

The local content cache service caches content under the following conditions:

  • the file size exceeds the configured file size streamsizemb

  • it is an offset request

  • the content service itself does not support offset handling (SFSV3, ICASV3, NetappV3), or the document is encrypted or compressed

When determining whether a document should be added to the cache, the service also checks whether the file would exceed the maximum cache size. If the maxcachesizemb limit is exceeded, the document will not be cached.

When using the cache, the documents are stored unencrypted in the local container temp folder for maximum 24h see cleanupperiod and ttlseconds for details

Repository-specific configuration

<repo>.contentcacheservice.type = local <repo>.contentcacheservice.local.streamsizemb = at what size a temporary file should be created in MB (default: 25)

Type none

The content cache service is not caching.

<repo>.contentcacheservice.type = none



Gobal configuration:

Property

Type

Default

Description

Property

Type

Default

Description

enabled

This property is available from Version 1.8.1, in Version 1.8.0 it cannot be disabled

boolean

true

Whether the globalcachecontentservice should be active; it must be active if the contentcacheservice local is enabled

path

string

System.getProperty("java.io.tmpdir")/<repo>

Folder path where cached documents are stored; the folder must exist
Default it is the temp dir used by java usually /tmp/<repo>/

ttlseconds

number

900

The amount of time in seconds after which a cached document is automatically deleted, after the last access on the file

maxcachesizemb

number

2048

Total size of files that may be stored in the cache folder

cleanupperiod

ISO 8601 duration

PT24H

How often the cleanup job should run; removes files that could not be deleted properly, for example, because the application was not shut down gracefully
Files are deleted when the file is older then the last access on the file multiplied with 3.

Example Configuration:

for docker compose:

services: ... environment: TIA_GLOBALCONTENTCACHESERVICE_ENABLED: "true" TIA_GLOBALCONTENTCACHESERVICE_PATH: "/tmp/cache" TIA_GLOBALCONTENTCACHESERVICE_TTLSECONDS: "900" TIA_GLOBALCONTENTCACHESERVICE_MAXCACHESIZEMB: "2048" TIA_GLOBALCONTENTCACHESERVICE_CLEANUPPERIOD: "PT24H" volumes: - cache-data:/tmp/cache volumes: cache-data:

for application.yml

tia: globalcontentcacheservice: enabled: true path: "/tmp/cache" ttlseconds: 900 maxcachesizemb: 2048 cleanupperiod: PT24H