class FileTextCache_Database implements FileTextCache (View source)

Caches the extracted content on the record for the file.

Limits the stored file content by default to avoid hitting query size limits.

Methods

public
load(File $file)

Return any cached extracted content for a given file entity

public
save(File $file, string $content)

Save extracted content for a given File entity

public
invalidate(File $file)

Invalidate the cache for a given file.

Details

load(File $file)

Return any cached extracted content for a given file entity

Parameters

File $file

save(File $file, string $content)

Save extracted content for a given File entity

Parameters

File $file
string $content

invalidate(File $file)

Invalidate the cache for a given file.

Invoked in onBeforeWrite on the file

Parameters

File $file