Skip to content
This repository has been archived by the owner on Jun 26, 2018. It is now read-only.

Latest commit

 

History

History
executable file
·
59 lines (36 loc) · 1.49 KB

README.md

File metadata and controls

executable file
·
59 lines (36 loc) · 1.49 KB

Cache Cleaner

You can use this extension to clear your typo3-caches programmatically.

Installation

  1. Install the extension.
  2. Create "_cli_lowlevel" User

Create "_cli_lowlevel" User

You have to create a backend-user named "_cli_lowlevel". The password doesn't matter, but you have to give the user the following TSconfig:

options.clearCache.all=1
options.clearCache.pages=1

How to use the Cache Cleaner API

Via PHP

// First Instance the CacheApiService

$cacheCleaner = new BERGWERK\BwrkCacheCleaner\Service\CacheApiService();

// Call one of the following options to clear the cache.

$cacheCleaner->clearAllCaches();              // Clear All Caches. Parameter true for hard delete
$cacheCleaner->clearPageCache();              // Clears the page cache.
$cacheCleaner->clearConfigurationCache();     // Clears the configuration cache.
$cacheCleaner->clearSystemCache();            // Clears the system cache
$cacheCleaner->clearAllActiveOpcodeCache();   // Clears all active opcode caches
$cacheCleaner->clearAllExceptPageCache();     // Clears all except the page cache

Via SSH

Call the cli dispatcher via ssh with the following command:

./typo3/cli_dispatch.phpsh extbase cache:run

Also you can add one of the following parameters: page, system, configuration, opc, except_page

If you doesn't add any Parameter, it will clear all caches hard.

Example for clear the page Cache via cli:

./typo3/cli_dispatch.phpsh extbase cache:run page