1 | <?php |
||
26 | class CacheService implements SingletonInterface |
||
27 | { |
||
28 | use ExtendedFacadeInstanceTrait; |
||
29 | |||
30 | const CACHE_IDENTIFIER = 'cache_formz'; |
||
31 | const GENERATED_FILES_PATH = 'typo3temp/Formz/'; |
||
32 | |||
33 | /** |
||
34 | * @var TypoScriptService |
||
35 | */ |
||
36 | protected $typoScriptService; |
||
37 | |||
38 | /** |
||
39 | * @var FrontendInterface |
||
40 | */ |
||
41 | protected $cacheInstance; |
||
42 | |||
43 | /** |
||
44 | * Returns the type of backend cache defined in TypoScript at the path: |
||
45 | * `settings.defaultBackendCache`. |
||
46 | * |
||
47 | * @return string |
||
48 | * @throws \Exception |
||
49 | */ |
||
50 | public function getBackendCache() |
||
70 | |||
71 | /** |
||
72 | * Returns the cache instance for this extension. |
||
73 | * |
||
74 | * @return FrontendInterface |
||
75 | */ |
||
76 | public function getCacheInstance() |
||
89 | |||
90 | /** |
||
91 | * Generic cache identifier creation for usages in the extension. |
||
92 | * |
||
93 | * @param string $string |
||
94 | * @param string $formClassName |
||
95 | * @param int $maxLength |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getCacheIdentifier($string, $formClassName, $maxLength = 55) |
||
111 | |||
112 | /** |
||
113 | * @param TypoScriptService $typoScriptService |
||
114 | */ |
||
115 | public function injectTypoScriptService(TypoScriptService $typoScriptService) |
||
119 | |||
120 | /** |
||
121 | * Function called when clearing TYPO3 caches. It will remove the temporary |
||
122 | * asset files created by Formz. |
||
123 | * |
||
124 | * @param array $parameters |
||
125 | */ |
||
126 | public function clearCacheCommand($parameters) |
||
142 | } |
||
143 |