FileContentCache; } /** * @param File $file * @param mixed $content */ public function save(File $file, $content) { $maxLength = $this->config()->get('max_content_length'); $file->FileContentCache = ($maxLength) ? substr($content, 0, $maxLength) : $content; $file->write(); } /** * @param File $file * @return void */ public function invalidate(File $file) { // To prevent writing to the cache from invalidating it if (!$file->isChanged('FileContentCache')) { $file->FileContentCache = ''; } } }